Height of Room check

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Drake Raider
Posts: 474
Joined: Fri Jul 18, 2008 12:27 pm

Height of Room check

Post by Drake Raider »

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
Tormentor667
Posts: 13548
Joined: Wed Jul 16, 2003 3:52 am

Re: Height of Room check

Post by Tormentor667 »

I might need that as well
User avatar
Apeirogon
Posts: 1606
Joined: Mon Jun 12, 2017 12:57 am

Re: Height of Room check

Post by Apeirogon »

Just to be sure, you use

Code: Select all

a_jumpif( (ceilingz - floorz) == 144, state name)
Drake Raider
Posts: 474
Joined: Fri Jul 18, 2008 12:27 pm

Re: Height of Room check

Post by Drake Raider »

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
Ichor
Posts: 1783
Joined: Wed Jul 23, 2003 9:22 pm

Re: Height of Room check

Post by Ichor »

Have you tried using one > instead of two?
Last edited by Ichor on Fri Jul 13, 2018 6:15 am, edited 1 time in total.
Drake Raider
Posts: 474
Joined: Fri Jul 18, 2008 12:27 pm

Re: Height of Room check

Post by Drake Raider »

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.

Return to “Scripting”