A_ChangeFlag

From ZDoom Wiki
Jump to: navigation, search

A_ChangeFlag (string flagname, bool value)


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