| Blockland Forums > Modification Help |
| Weapon/projectile relations |
| (1/1) |
| ThinkInvisible:
I'm making weapons for homing rocket script, the weapon never actually spawns a projectile through default function. Do i need to include all the projectile stuff? --- Code: --- ammo = " "; projectile = rocketLauncherProjectile; projectileType = Projectile; shellExitDir = "1.0 -1.3 1.0"; shellExitOffset = "0 0 0"; shellExitVariance = 15.0; shellVelocity = 7.0; --- End code --- That. Editnote: Oh how i hate datablocks. Also, what's the variable for a vehicle's driver, the vehicle's maxHP, and the type of vehicle?(Flying/ground) |
| Amade:
1. No, you do not need to specify the projectile information (you should probably leave it there though, it's not hurting anyone). 2. Driver: %vehicle.getMountedObject(0) Max HP: %vehicle.getDatablock().maxDamage Type: %vehicle.getClassName() - this will be WheeledVehicle or FlyingVehicle, I think there are a few other types as well |
| ThinkInvisible:
--- Quote from: Amade on August 21, 2011, 06:04:08 PM ---1. No, you do not need to specify the projectile information (you should probably leave it there though, it's not hurting anyone). 2. Driver: %vehicle.getMountedObject(0) Max HP: %vehicle.getDatablock().maxDamage Type: %vehicle.getClassName() - this will be WheeledVehicle or FlyingVehicle, I think there are a few other types as well --- End quote --- Thank you so much. Btw, 1. It's because it's taking up a bunch of space. One more thing: I'm trying to set minShotTime to a higher value for more powerful weapons, but it's not working. Is there anything else I have to change? |
| ThinkInvisible:
Stunt plane isn't registering as flyingVehicle. |
| Navigation |
| Message Index |