A_RaiseSelf
Jump to navigation
Jump to search
bool A_RaiseSelf [(int flags)]
Usage
Resurrects the calling actor. The actor cannot be resurrected if:
- it is not a corpse.
- the duration of its current state is not -1 and said state lacks the CanRaise keyword.
- it is a player.
- lacks the Raise state.
- there is not enough room for it to raise (this check is bypassed if the RF_NOCHECKPOSITION flag is passed to the function).
- CanResurrect resolves to failure.
Parameters
- flags: the following flags can be combined using the bit-wise OR operator (|):
- RF_NOCHECKPOSITION — resurrect the actor without checking for room.
Return value
The function returns true if the actor is resurrected successfully, otherwise it returns false.
Examples
This undead warrior keeps coming back to life as long it does not sustain heavy damage.
class ResKnight : Knight { States { Death: KNIG I 6; KNIG J 6 A_Scream; KNIG K 6; KNIG L 6 A_NoBlocking; KNIG MN 6; KNIG O 105; KNIG O -1 { if (health > -100) { A_RaiseSelf(); } } Stop; Raise: KNIG NMLKJI 5; Goto See; } }