ZS move floor/ceiling relative to starting height?

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.

ZS move floor/ceiling relative to starting height?

Postby Matt » Fri Nov 08, 2019 9:00 pm

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.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: ZS move floor/ceiling relative to starting height?

Postby Cherno » Fri Nov 08, 2019 9:12 pm

How would you refer to the sector in zScript?
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: ZS move floor/ceiling relative to starting height?

Postby Matt » Sat Nov 09, 2019 3:05 am

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.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: ZS move floor/ceiling relative to starting height?

Postby Graf Zahl » Sat Nov 09, 2019 3:34 am

A sector plane has no 'height', due to slopes. You have to call ZAtPoint to get the height from a reference point.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest