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 will 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.
Death wyvern
Actor type Monster Game MiniHexenLogoIcon.png (Hexen)
DoomEd Number 254 Class Name Dragon

Classes: Dragon
The death wyvern is an undead dragon with powerful attacks, encountered in the Hypostyle in Hexen and in Brackenwood in the expansion. Its flight pattern is more convincing than that of most winged creatures (even in modern games), as it doesn't just levitate like an afrit, gargoyle or cacodemon, but actually always move. However, this effect is achieved through special coding and using a death wyvern in a map is not as simple as just placing it there.

Using a death wyvern on a map

The first thing to do is give a TID to the death wyvern. Its native action A_DragonInitFlight will seek for the first thing with the same TID for this and store as the wyvern's tracer. (The tracer is the pointer typically used by homing projectiles to keep track of their target.) For example, in the DoomWikiLogoIcon.pngHypostyle map, an ettin is used as this first target.

The second thing is to place some actors in the area where the wyvern must fly. They will be used as its path nodes for flying. The first can be a monster (such as the hapless ettin in the Hypostyle), and needs to share the wyvern's TID as explained above; but the next must have unique TIDs and should better be persistent, invisible and non-solid (typically, you'll want to use map spots for this). Their TIDs will be used as the arguments for the first, and conversely each will have for arguments the TIDs for the rest of the series.

A_DragonFlight causes the wyvern to attack its current tracer (25% chance) if it is shootable, and then select another tracer based on the TIDs given in the current tracer's arguments.

For example:

A simple circular path grid.
  • A death wyvern with a TID of 250.
  • A map spot with a TID of 250 which has for arguments 251 and 252.
  • A map spot with a TID of 251 which has for arguments 250 and 253.
  • A map spot with a TID of 252 which has for arguments 250 and 254.
  • A map spot with a TID of 253 which has for arguments 251 and 255.
  • A map spot with a TID of 254 which has for arguments 252 and 255.
  • A map spot with a TID of 255 which has for arguments 253 and 254.

This results in a circular pathnode network where the death wyvern can fly in either direction. It is possible to make more elaborate patterns, and to have connections between two of the path nodes as one-way only.

In any case, the wyvern should have at least three stable path nodes so that it can move around correctly. If the wyvern has no path nodes at all (its TID is left to 0), then it will simply not move.

DECORATE definition

ACTOR Dragon
  Health 640
  PainChance 128
  Speed 10
  Height 65
  Mass 0x7fffffff
  SeeSound "DragonSight"
  AttackSound "DragonAttack"
  PainSound "DragonPain"
  DeathSound "DragonDeath"
  ActiveSound "DragonActive"
  Obituary "$OB_DRAGON"

  action native A_DragonInitFlight();
  action native A_DragonFlap();
  action native A_DragonFlight();
  action native A_DragonPain();
  action native A_DragonAttack();
  action native A_DragonCheckCrash();

    DRAG D 10 A_Look
    DRAG CB 5
    DRAG A 5 A_DragonInitFlight
    DRAG B 3 A_DragonFlap
    DRAG BCCDDCCBBAA 3 A_DragonFlight
    Goto See+3
    DRAG F 10 A_DragonPain
    Goto See+3
    DRAG E 8 A_DragonAttack
    Goto See+3
    DRAG G 5 A_Scream
    DRAG H 4 A_NoBlocking
    DRAG I 4
    DRAG J 4 A_DragonCheckCrash
    DRAG KL 5
    DRAG M -1