A_ChangeFlag
Jump to navigation
Jump to search
void A_ChangeFlag (string flagname, bool value)
Note: The feature described should only be used in DECORATE code and should be considered deprecated in ZScript code where direct access to flags should be used instead. |
Usage
Changes the specified flag and sets it to the given value. Note that not all flags will produce useful results when changed during gameplay.
Parameters
- flagname: the name of the flag to change.
- value: the value to set the flag to. true sets the flag, while false clears it.
Examples
This imp attempts to flee from the attacker if it gets stunned by an attack.
actor CowardImp : DoomImp { States { Pain: TROO H 2 A_ChangeFlag("FRIGHTENED", true) TROO H 2 A_Pain Goto See } }