A_RaiseChildren

From ZDoom Wiki
Jump to navigation Jump to search

A_RaiseChildren [(int flags)]

Usage

Resurrects the calling actor's children. 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 that spawns clones of itself. Its missile state uses A_Jump to decide on using one of two different attacks. Either spawning a clone, or triggering A_RaiseChildren, reviving all clones that were already spawned and had died.

ACTOR VoodooLeaderImp : DoomImp
{
  Game Doom
  SpawnID 5
  Health 100
  Mass 1000
  PainChance 255
  States
  {
  Missile:
    TROO G 0 A_Jump(256, "Missile1", "Missile2")
  Missile1:
    TROO EF 8 A_FaceTarget
    TROO G 6 A_SpawnItemEx("SoldierImp", 50, 50, 60, 0, 0, 0, 0, SXF_SETMASTER)
    Goto See
  Missile2:
    TROO EF 8 A_FaceTarget
    TROO G 6 A_RaiseChildren
    Goto See
  }
}

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.