A_KillSiblings

From ZDoom Wiki
Jump to: navigation, search

A_KillSiblings (string damagetype)


Called by monsters to kill the monsters that were spawned by the same master (other than the caller). Currently the only function that sets the necessary information is A_SpawnItemEx. Optionally, a damagetype parameter can be given. Note that damage inflicted by this codepointer is not affected by damage factors.

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

Examples

The following is a variant of the doom imp, a monster spawned by a different monster using the master/child flag. If it gets killed with an attack with the "Curse" damage type, its death state triggers A_KillSiblings, killing all of the other monsters spawned by the same 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
  }
}



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