Page 1 of 1

A_JumpIfFlag

PostPosted: Fri Nov 17, 2017 6:44 pm
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

Re: A_JumpIfFlag

PostPosted: Fri Nov 17, 2017 7:37 pm
by Blue Shadow

Re: A_JumpIfFlag

PostPosted: Fri Nov 17, 2017 7:37 pm
by Major Cooke
In DECORATE, there's already A_CheckFlag.

In ZScript all you have to do is <pointer>.b<flagname>.
Code: Select allExpand view
if (target && target.bSHOOTABLE)

Re: A_JumpIfFlag

PostPosted: Fri Nov 17, 2017 7:50 pm
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)

Re: A_JumpIfFlag

PostPosted: Sat Nov 18, 2017 5:40 am
by ZzZombo
It might have failed simply because after resurrection, the resurrected monster copies friendliness of the one that did the resurrection.