- Documentation
- Projectiles
Category
Projectiles
All Lua functions and events in the Projectiles category, on the server and the client.
Server functions 8
createCreates a projectile element on the server (grenade, rocket, Molotov, satchel charge, etc.) with a creator, type, force and target. FiresProjectile onProjectileCreation. The type is a weapon ID, e.g. 16 grenade, 17 tear gas, 18 Molotov, 19 rocket, 20 heat-seeking rocket, 39 satchel.detonateDetonates all satchel charges (type 39 projectiles) placed by a player; without a player, all on the server. Each explodes at its position and disappears.Satchels getReturns the projectile counter in ms (time to explosion set withProjectile Counter setProjectileCounter; 0 = none).getReturns the element that fired the projectile.Projectile Creator getReturns the force the projectile was created with (1 by default).Projectile Force getReturns the target of a homing projectile.Projectile Target getReturns the projectile type (weapon ID).Projectile Type setSets the projectile's time to explosion in ms. When it runs out, an explosion matching the projectile type happens at its position and the projectile disappears.Projectile Counter