A_JumpIf question
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
A_JumpIf question
After reading the introduction about A_JumpIf in the wiki. I still don't understand how to write the expression for it.
For example, how do I identify the x coordinate is larger 1024 and then jumps a specified state number?
Another question is, what is "pitch" in the A_JumpIf wiki page?
For example, how do I identify the x coordinate is larger 1024 and then jumps a specified state number?
Another question is, what is "pitch" in the A_JumpIf wiki page?
Re: A_JumpIf question
This will jump 4 frames ahead if the x coordinate is larger than 1024:carlcyber wrote:After reading the introduction about A_JumpIf in the wiki. I still don't understand how to write the expression for it.
For example, how do I identify the x coordinate is larger 1024 and then jumps a specified state number?
Code: Select all
TNT1 A 0 A_JumpIf(x > 1024, 4);The pitch is the Z-angle (up/down) which the actor in question is currently facing. I believe this may only be useful for players, but maybe projectiles store this value as well? Somebody more knowledgable with DECORATE could probably clarify.Another question is, what is "pitch" in the A_JumpIf wiki page?
- Electronic Samurai
- Posts: 177
- Joined: Mon Mar 27, 2006 1:54 am
- Location: Wandering the open plains
- solarsnowfall
- Posts: 1581
- Joined: Thu Jun 30, 2005 1:44 am
- Bio Hazard
- Posts: 4019
- Joined: Fri Aug 15, 2003 8:15 pm
- Location: ferret ~/C/ZDL $
- Contact:
- Bio Hazard
- Posts: 4019
- Joined: Fri Aug 15, 2003 8:15 pm
- Location: ferret ~/C/ZDL $
- Contact:
Um, wouldn'tevaluate true if either i OR q were true but not if both were true? The only way I can think to do that with other operators is with
Hmm, I could have sworn I'd seen it in C somewhere but I guess you're right.
Code: Select all
if(i ^^ q){Code: Select all
if((i && !q) || (!i && q)){- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Code: Select all
if (!!i ^ !!q) ...
- Bio Hazard
- Posts: 4019
- Joined: Fri Aug 15, 2003 8:15 pm
- Location: ferret ~/C/ZDL $
- Contact:
That's still more text (and instructions) than
Code: Select all
if(i^^q)"If not not i or not not q"?Graf Zahl wrote:Code: Select all
if (!!i ^ !!q) ...
What?
<brain explodes>