A_RaiseMaster

From ZDoom Wiki
Jump to navigation Jump to search

A_RaiseMaster [(int flags)]

Usage

Resurrects the calling actor's master. Currently the only function that sets the necessary information is A_SpawnItemEx.

Parameters

  • flags: The following flags can be combined using the bit-wise OR operator (|):
    • RF_TRANSFERFRIENDLINESS — the resurrected actors will change their affiliation to match that of the calling actor.
    • RF_NOCHECKPOSITION — resurrect the actor without checking for room.

Monsters spawned with A_SpawnProjectile are not affected by this. A_SpawnProjectile was never designed to spawn monsters.

Examples

The following is a variant of the doom imp, a monster whose sole purpose is to revive its master through its death. Upon dying, its death state triggers A_RaiseMaster, reviving the monster who spawned it with the master/child flag.

ACTOR SacrificialImp : DoomImp
{
  States
  {
  Death:
    TROO I 8 
    TROO J 8 A_Scream
    TROO K 6 A_RaiseMaster
    TROO L 6 A_NoBlocking
    TROO M -1
    Stop
  }
}

Children/Master/Siblings relationship codepointers
A_DamageChildren A_DamageMaster A_DamageSiblings A_DamageTarget A_DamageTracer
A_KillChildren A_KillMaster A_KillSiblings A_KillTarget A_KillTracer
A_RaiseChildren A_RaiseMaster A_RaiseSiblings
A_RemoveChildren A_RemoveMaster A_RemoveSiblings A_RemoveTarget A_RemoveTracer
Note: Raise and damage functions only work with monsters. Kill functions can be used on monsters and missiles.