Classes:Demon2

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.
Brown chaos serpent
Actor type Monster Game MiniHexenLogoIcon.png (Hexen)
DoomEd Number 8080 Class Name Demon2


Classes: Demon1Demon2
 →Demon2Mash

The brown chaos serpent is a less common foe in Hexen than his green cousin. They are however very similar to the green serpents. They spit green fire balls, which despite their appearance are not poisonous.

DECORATE definition

ACTOR Demon2 : Demon1
{
  Obituary "$OB_DEMON2"
  Species "Demon2"
  States
  {
  Spawn:
    DEM2 AA 10 A_Look
    Loop
  See:
    DEM2 ABCD 4 A_Chase
    Loop
  Pain:
    DEM2 E 4
    DEM2 E 4 A_Pain
    Goto See
  Melee:
    DEM2 E 6 A_FaceTarget
    DEM2 F 8 A_FaceTarget
    DEM2 G 6 A_CustomMeleeAttack(random[DemonAttack1](1, 8)*2)
    Goto See
  Missile:
    DEM2 E 5 A_FaceTarget
    DEM2 F 6 A_FaceTarget
    DEM2 G 5 A_CustomMissile("Demon2FX1", 62, 0)
    Goto See
  Death:
    DEM2 HI 6
    DEM2 J 6 A_Scream
    DEM2 K 6 A_NoBlocking
    DEM2 L 6 A_QueueCorpse
    DEM2 MNO 6
    DEM2 P -1
    Stop
  XDeath:
    DEM2 H 6
    DEM2 I 0 A_SpawnItemEx("Demon2Chunk1", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle+90),
                           frandom[DemonChunks](1, 4.984375)*sin(angle+90), 8, 90, ChunkFlags)
    DEM2 I 0 A_SpawnItemEx("Demon2Chunk2", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle-90),
                           frandom[DemonChunks](1, 4.984375)*sin(angle-90), 8, 270, ChunkFlags)
    DEM2 I 0 A_SpawnItemEx("Demon2Chunk3", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle-90),
                           frandom[DemonChunks](1, 4.984375)*sin(angle-90), 8, 270, ChunkFlags)
    DEM2 I 0 A_SpawnItemEx("Demon2Chunk4", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle-90),
                           frandom[DemonChunks](1, 4.984375)*sin(angle-90), 8, 270, ChunkFlags)
    DEM2 I 6 A_SpawnItemEx("Demon2Chunk5", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle-90),
                           frandom[DemonChunks](1, 4.984375)*sin(angle-90), 8, 270, ChunkFlags)
    Goto Death+2
  }
}