Classes:Demon1

From ZDoom Wiki
Jump to navigation Jump to 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.
Green chaos serpent
Actor type Monster Game MiniHexenLogoIcon.png (Hexen)
DoomEd Number 31 Class Name Demon1
Spawn ID 3 Identifier T_DEMON1


Classes: Demon1
 →Demon1Mash
 →Demon2
  →Demon2Mash

The green chaos serpent is a common foe in Hexen, appearing first in the Seven Portals. However, they are quite weak compared to the exceptional specimen of that breed that D'Sparil rode to battle in E3M8 of Heretic. They can spit fireballs and have a powerful bite attack. Even when they aren't gibbed, their body explode and not much is left of it when they die.

DECORATE definition

ACTOR Demon1
{
  Health 250
  PainChance 50
  Speed 13
  Radius 32
  Height 64
  Mass 220
  Monster
  +TELESTOMP
  +FLOORCLIP
  SeeSound "DemonSight"
  AttackSound "DemonAttack"
  PainSound "DemonPain"
  DeathSound "DemonDeath"
  ActiveSound "DemonActive"
  Obituary "$OB_DEMON1"
  const int ChunkFlags = SXF_TRANSFERTRANSLATION|SXF_ABSOLUTEVELOCITY;
  States
  {
  Spawn:
    DEMN AA 10 A_Look
    Loop
  See:
    DEMN ABCD 4 A_Chase
    Loop
  Pain:
    DEMN E 4
    DEMN E 4 A_Pain
    Goto See
  Melee:
    DEMN E 6 A_FaceTarget
    DEMN F 8 A_FaceTarget
    DEMN G 6 A_CustomMeleeAttack(random[DemonAttack1](1, 8)*2)
    Goto See
  Missile:
    DEMN E 5 A_FaceTarget
    DEMN F 6 A_FaceTarget
    DEMN G 5 A_CustomMissile("Demon1FX1", 62, 0)
    Goto See
  Death:
    DEMN HI 6
    DEMN J 6 A_Scream
    DEMN K 6 A_NoBlocking
    DEMN L 6 A_QueueCorpse
    DEMN MNO 6
    DEMN P -1
    Stop
  XDeath:
    DEMN H 6
    DEMN I 0 A_SpawnItemEx("Demon1Chunk1", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle+90),
                           frandom[DemonChunks](1, 4.984375)*sin(angle+90), 8, 90, ChunkFlags)
    DEMN I 0 A_SpawnItemEx("Demon1Chunk2", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle-90),
                           frandom[DemonChunks](1, 4.984375)*sin(angle-90), 8, 270, ChunkFlags)
    DEMN I 0 A_SpawnItemEx("Demon1Chunk3", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle-90),
                           frandom[DemonChunks](1, 4.984375)*sin(angle-90), 8, 270, ChunkFlags)
    DEMN I 0 A_SpawnItemEx("Demon1Chunk4", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle-90),
                           frandom[DemonChunks](1, 4.984375)*sin(angle-90), 8, 270, ChunkFlags)
    DEMN I 6 A_SpawnItemEx("Demon1Chunk5", 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
  Ice:
    DEMN Q 5 A_FreezeDeath
    DEMN Q 1 A_FreezeDeathChunks
    Wait
  }
}