A_JumpIfFlag could be used on actors to read their own flag, so you could constantly change the flag and check it (would be useful to check if the actor is a friendly monster or not)
A_JumpIfFlag("State to jump", "Which flag")
If the given flag is not existing then it would just skip it
A_JumpIfFlag
Moderator: GZDoom Developers
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
- Major Cooke
- Posts: 8175
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: A_JumpIfFlag
In DECORATE, there's already A_CheckFlag.
In ZScript all you have to do is <pointer>.b<flagname>.
In ZScript all you have to do is <pointer>.b<flagname>.
Code: Select all
if (target && target.bSHOOTABLE)
- Kizoky
- Posts: 291
- Joined: Mon Nov 14, 2011 9:59 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: Around weirdos, I'm the biggest weirdo among them
- Contact:
Re: A_JumpIfFlag
Is it really possible to do that? Last time I tried using A_CheckFlag it didn't work for some reason
what I wanted to achieve is to check if the resurrected monster is a friendly monster or not, and if it is it would replace itself with an another monster that has translation (whole monster is blue)
what I wanted to achieve is to check if the resurrected monster is a friendly monster or not, and if it is it would replace itself with an another monster that has translation (whole monster is blue)
Re: A_JumpIfFlag
It might have failed simply because after resurrection, the resurrected monster copies friendliness of the one that did the resurrection.