A_RemoveSiblings

From ZDoom Wiki
Jump to: navigation, search

A_RemoveSiblings [(bool all)]

Called by monsters to completely remove all monsters spawned by the calling actor's master. If all is false or not specified, only dead siblings are removed. Currently the only function that sets the necessary information is A_SpawnItemEx.

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

Examples

The following is a variant on the doom imp, a monster spawned by a different monster using the master/child flag. If it dies from damage type "Banish", its death state triggers A_RemoveSiblings, completely removing all the other clones who were spawned by their master.

ACTOR SoldierImp : DoomImp
{
  States
  {
  Pain.Voodoo:
    TROO H 2 A_Pain
    TROO H 50
    Goto See
  Pain.Curse:
    TROO H 2 A_Pain
    TROO H 2 A_DamageSiblings(15)
    Goto See
  Death:
    TROO I 8 A_DamageMaster(-25)
    TROO J 8 A_Scream
    TROO K 6
    TROO L 6 A_NoBlocking
    TROO M -1
    Stop
  Death.Curse:
    TROO I 8 A_KillMaster
    TROO J 8 A_Scream
    TROO K 6 A_KillSiblings
    TROO L 6 A_NoBlocking
    TROO M -1
    Stop
  Death.Banish:
    TROO I 8 A_RemoveMaster
    TROO J 8 A_Scream
    TROO K 6 A_RemoveSiblings
    TROO L 6 A_NoBlocking
    TROO M 6
    TNT1 A -1
    Stop
  }
}

Children/Master/Siblings relationship codepointers
A_DamageChildren A_DamageMaster A_DamageSiblings
A_KillChildren A_KillMaster A_KillSiblings
A_RaiseChildren A_RaiseMaster A_RaiseSiblings
A_RemoveChildren A_RemoveMaster A_RemoveSiblings
Note: These functions only work with monsters.
Personal tools
Namespaces

Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox