[Already In] A_JumpIfFlag

Moderator: Developers

A_JumpIfFlag

Postby Kizoky » Fri Nov 17, 2017 6:44 pm

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
User avatar
Kizoky
I smell like gravity
 
Joined: 14 Nov 2011
Location: Around weirdos, I'm the biggest weirdo among them
Discord: Kizoky#0375

Re: A_JumpIfFlag

Postby Blue Shadow » Fri Nov 17, 2017 7:37 pm

User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010

Re: A_JumpIfFlag

Postby Major Cooke » Fri Nov 17, 2017 7:37 pm

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)
User avatar
Major Cooke
The road to Hell is paved in the carrion she leaves behind.
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: A_JumpIfFlag

Postby Kizoky » Fri Nov 17, 2017 7:50 pm

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)
User avatar
Kizoky
I smell like gravity
 
Joined: 14 Nov 2011
Location: Around weirdos, I'm the biggest weirdo among them
Discord: Kizoky#0375

Re: A_JumpIfFlag

Postby ZzZombo » Sat Nov 18, 2017 5:40 am

It might have failed simply because after resurrection, the resurrected monster copies friendliness of the one that did the resurrection.
ZzZombo
 
Joined: 16 Jul 2012


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest