A_ChangeFlag

From ZDoom Wiki
Jump to: navigation, search

A_ChangeFlag (string flagname, bool value)

Nuvolabomb.png Warning: The feature described on this page has been deprecated, and will no longer be supported or updated by the ZDoom developers. While some functionality may be retained for the purposes of backwards-compatibility, authors are strongly discouraged from utilizing this feature in future maps and to instead use direct access to flags when working in ZScript. Compatibility with future ZDoom versions is not guaranteed.

Changes the specified flag and sets it to the given value. A value of true, sets the specified flag, and a value of false, clears it. Note that not all flags will produce useful results when changed during gameplay.

Example

This imp will activate the FRIGHTENED flag when it enters its pain state, meaning it will attempt to flee from the attacker when hit.

ACTOR CowardImp : DoomImp
{
  States
  {
  Pain:
    TROO H 2 A_ChangeFlag("FRIGHTENED", TRUE)
    TROO H 2 A_Pain
    Goto See
  }
}

See Also

Actor flags