Classes:BossEye

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.
Boss cube shooter
Actor type Monster Game MiniDoom2LogoIcon.png (Doom2)
DoomEd Number 89 Class Name BossEye


Classes: BossEye


This is an invisible actor that periodically fires the SpawnShot actor, more commonly known as the "Boss Cube," as part of the boss on Doom 2's MAP30. Each cube will fly to a random location on the map (determined by a series of BossTarget actors placed in the map) and spawn an enemy at random.

DECORATE definition

ACTOR BossEye
{
  Height 32
  +NOBLOCKMAP
  +NOSECTOR
  States
  {
  Spawn:
    SSWV A 10 A_Look
    Loop
  See:
    SSWV A 181 A_BrainAwake
    SSWV A 150 A_BrainSpit  // See SpawnShot
    Wait
  }
}

Customization

You can customize which actors are spawned by inheriting from the BossEye actor and providing a list of actors using the DropItem property. For example, this code will create a new shooter that will spawn one of five custom monsters:

actor CustomEye : BossEye
{
  DropItem "UberZombie"
  DropItem "NaziCommando"
  DropItem "Trite"
  DropItem "D3Imp"
  DropItem "Chicken"
}

Like for RandomSpawner, the second optional parameter of DropItem can be used to weigh the list, however the first optional parameter has no effect. The following example accurately replicates the odds of the normal BossEye:

actor ICantBelieveItsNotBossEye : BossEye
{
  DropItem "DoomImp" 		255 50
  DropItem "Demon"		255 40
  DropItem "Spectre"		255 30
  DropItem "PainElemental"	255 10
  DropItem "Cacodemon"		255 30
  DropItem "Archvile"		255  2
  DropItem "Revenant"		255 10
  DropItem "Arachnotron"	255 20
  DropItem "Fatso"		255 30
  DropItem "HellKnight"		255 24
  DropItem "BaronOfHell"	255 10
}