Author Topic: Projectile Help  (Read 563 times)

How do I script a driver in a vehicle being able to shoot something?

For advanced users - look at the tank turret code
For beginner users - http://forum.blockland.us/index.php?topic=51249.0

Thank you, now, what joints do I need? Just a muzzlePoint?

Ok, I got that working, but I don't know the projectile name of the gravity rocket apprently.

This is what I put in the server.cs:
Code: [Select]
ShootOnClick_Projectile[0]=RocketGravity;
This is the error I get:
Code: [Select]
Object 'RocketGravity' is not a member of the 'GameBaseData' data block class
Add-Ons/Vehicle_Go_Kart/Support_shootOnClick.cs (99): Register object failed for object (null) of class Projectile.
Set::add: Object "0" doesn't exist

1. I don't know if the first code snippet is an object property or what, but I don't think that is valid syntax.

2. Then find out...

Projectile_GravityRocket/server.cs
Code: [Select]
datablock ProjectileData(gravityRocketProjectile)

1. I don't know if the first code snippet is an object property or what, but I don't think that is valid syntax.

2. Then find out...

Projectile_GravityRocket/server.cs
Code: [Select]
datablock ProjectileData(gravityRocketProjectile)

This worked, thanks a lot.

Idk what you mean by object property, but the snippet is right, the only error I ever got was that it couldn't find the projectile.

Idk what you mean by object property, but the snippet is right, the only error I ever got was that it couldn't find the projectile.
You have to either have to projectile in the add-on folder or you have to use the file path to the already existing gravity rocket.

If you use the second option, you will have to add some script functionality that will try to force Gravity Rockets to enable in a server, and give you errors if it can't find it.