Classes:ThrowingBomb

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
  1. This actor is already defined in GZDoom, there's no reason to define it again.
  2. In fact, trying to define an actor with the same name will cause an error (because it already exists).
  3. If you want to make your own version of this actor, use inheritance.
  4. Definitions for existing actors are put on the wiki for reference purpose only.
Fléchette used by a fighter
Actor type Explosive Game MiniHexenLogoIcon.png (Hexen)
DoomEd Number None Class Name ThrowingBomb


Classes: ThrowingBomb

A projectile spawned when a fighter fléchette is used, it bounces on the ground and explodes after a short while or when hitting an actor or a wall.

DECORATE definition

ACTOR ThrowingBomb
{
  Health 48
  Speed 12
  Radius 8
  Height 10
  DamageType "Fire"
  +NOBLOCKMAP
  +DROPOFF
  +MISSILE
  BounceType "HexenCompat"
  SeeSound "FlechetteBounce"
  DeathSound "FlechetteExplode"

  action native A_CheckThrowBomb();
  action native A_CheckThrowBomb2();

  States
  {
  Spawn:
    THRW A 4 A_CheckThrowBomb
    THRW BCDE 3 A_CheckThrowBomb
    THRW F 3 A_CheckThrowBomb2
    Loop
    THRW G 6 A_CheckThrowBomb
    THRW F 4 A_CheckThrowBomb
    THRW H 6 A_CheckThrowBomb
    THRW F 4 A_CheckThrowBomb
    THRW G 6 A_CheckThrowBomb
    THRW F 3 A_CheckThrowBomb
    Wait
  Death:
    CFCF Q 4 Bright A_NoGravity
    CFCF R 3 Bright A_Scream
    CFCF S 4 Bright A_Explode
    CFCF T 3 Bright
    CFCF U 4 Bright
    CFCF W 3 Bright
    CFCF X 4 Bright
    CFCF Z 3 Bright
    Stop
  }
}