Is there any ZScript function that does this natively, or is there any function that can reliably get a starting height from which to derive a MoveFloor/MoveCeiling target?
I can MoveFloor/Ceiling if I have a convenient spot on the map as a reference point and get the starting height from that, but I have no idea what to do if there is no such reference point and all I want to do is just move the sector in question by X number of units up or down.
ZS move floor/ceiling relative to starting height?
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!)
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!)
Re: ZS move floor/ceiling relative to starting height?
How would you refer to the sector in zScript?
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: ZS move floor/ceiling relative to starting height?
For the earlier thing I'd use a line trace and use the sector it hit.
For the implementation I'm asking this for, I'm picking a random sector from a list.
For the implementation I'm asking this for, I'm picking a random sector from a list.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49073
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZS move floor/ceiling relative to starting height?
A sector plane has no 'height', due to slopes. You have to call ZAtPoint to get the height from a reference point.