A_JumpIfFlag

Moderator: GZDoom Developers

Post Reply
User avatar
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:

A_JumpIfFlag

Post by Kizoky »

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
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: A_JumpIfFlag

Post by Blue Shadow »

User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: A_JumpIfFlag

Post by Major Cooke »

In DECORATE, there's already A_CheckFlag.

In ZScript all you have to do is <pointer>.b<flagname>.

Code: Select all

if (target && target.bSHOOTABLE)
User avatar
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

Post by Kizoky »

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)
ZzZombo
Posts: 315
Joined: Mon Jul 16, 2012 2:02 am

Re: A_JumpIfFlag

Post by ZzZombo »

It might have failed simply because after resurrection, the resurrected monster copies friendliness of the one that did the resurrection.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”