Explosive Ammo
The ExplosiveAmmo
script extends ProjectileAmmo
by adding area-of-effect explosion logic. When the projectile impacts a surface or target, it deals splash damage to everything within its defined radius.
This makes it perfect for heavy weapons or spells designed to hit multiple enemies at once.
✅ Ideal For
- Rockets
- Explosive grenades
📐 Inspector Fields
Field | Description |
---|---|
On Impact (DamageData) | Called when the explosion is triggered; use it for VFX, SFX, and gameplay hooks |
Speed | Travel speed of the projectile |
Lifetime | Time before despawn if no impact occurs |
Range | Radius of the explosion in world units |
Falloff Normalized | Defines how damage scales from the center outward (0 = full damage, 1 = minimal) |