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. Not all flags will produce useful results when changed in the game.

Example

actor CowardImp : DoomImp
{
    states
    {
    Pain:
        TROO H 2 A_ChangeFlag("FRIGHTENED", 1)
        TROO H 2 A_Pain
        goto See
    }
}

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

See Also

Actor flags

Personal tools
Namespaces
Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox