Classes:Grenade

From ZDoom Wiki
Jump to: navigation, search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do not need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it's actually harmful as it can cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
  5. There is only one exception: if what you want is changing Ammo capacity, you need to create a new type from Ammo.
Grenade
Actor type Explosive Game MiniZDoomLogoIcon.png
DoomEd Number None Class Name Grenade
Spawn ID 216 Identifier T_GRENADE


Classes: Grenade

Bouncing projectile of the GrenadeLauncher. Contrarily to most projectiles, it is affected by gravity. Previously a Skulltag-exclusive actor, it has been backported for compatibility in development versions as it is used for the default actor of A_FireSTGrenade. Sounds are not, however, included. Since r1824, it also serves as a container for several MBF states related to grenades or explosion.

DECORATE definition

ACTOR Grenade
{
  Radius 8
  Height 8
  Speed 25
  Damage 20
  Projectile
  -NOGRAVITY
  +RANDOMIZE
  +DEHEXPLOSION
  +GRENADETRAIL
  BounceType "Doom"
  Gravity 0.25
  SeeSound "weapons/grenlf"
  DeathSound "weapons/grenlx"
  BounceSound "weapons/grbnce"
  Obituary "$OB_GRENADE" // "%o caught %k's grenade."
  DamageType Grenade
  States
  {
  Spawn:
    SGRN A 1 Bright
    Loop
  Death:
    MISL B 8 Bright A_Explode
    MISL C 6 Bright
    MISL D 4 Bright
    Stop
  Grenade:
    MISL A 1000 A_Die
    Wait
  Detonate:
    MISL B 4 A_Scream
    MISL C 6 A_Detonate
    MISL D 10
    Stop
  Mushroom:
    MISL B 8 A_Mushroom
    Goto Death+1
  }
}