Height of Room check

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Height of Room check

Postby Drake Raider » Wed Jul 11, 2018 1:22 pm

Alright. I have an actor that's supposed to only do a certain action in rooms of the correct height. So I have a A_jumpif with ceilingz-floorz but it never triggers no matter what I set the target value to. Any guidance?
User avatar
Drake Raider
Currently working on Blanket Doom
 
Joined: 18 Jul 2008
Location: Plane of thought.

Re: Height of Room check

Postby Tormentor667 » Wed Jul 11, 2018 2:51 pm

I might need that as well
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Height of Room check

Postby Apeirogon » Wed Jul 11, 2018 3:14 pm

Just to be sure, you use
Code: Select allExpand view
a_jumpif( (ceilingz - floorz) == 144, state name)
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Height of Room check

Postby Drake Raider » Wed Jul 11, 2018 8:18 pm

Correct, but with greater than rather than equals. Typing on phone away from laptop so hard to be sure. But it just refuses to pass. I use 72. I tried >= 72 and >> 71 with no go.
User avatar
Drake Raider
Currently working on Blanket Doom
 
Joined: 18 Jul 2008
Location: Plane of thought.

Re: Height of Room check

Postby Ichor » Thu Jul 12, 2018 8:50 am

Have you tried using one > instead of two?
Last edited by Ichor on Fri Jul 13, 2018 7:15 am, edited 1 time in total.
User avatar
Ichor
The fun cannot be halted
 
Joined: 23 Jul 2003

Re: Height of Room check

Postby Drake Raider » Thu Jul 12, 2018 9:07 pm

Yup... Turns out that was the last one. Just double checked and that's what the comment said.

EDIT: Got it fixed. I was just estimating room heights incorrectly. Sorry folks.
User avatar
Drake Raider
Currently working on Blanket Doom
 
Joined: 18 Jul 2008
Location: Plane of thought.


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests