Height Check for Switchable Decorations

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Zan
Posts: 338
Joined: Sat Oct 22, 2016 12:43 pm
Location: The depths of Hedon.
Contact:

Height Check for Switchable Decorations

Post by Zan »

Would it be possible to add a flag or something to check the player's height when activating switchable decorations?

For example, right now, you can toggle a lamp that's on a tower above you if you are in front of it in plan view. It would be nice to have something similar to the switch height check when using these decorations.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Height Check for Switchable Decorations

Post by Graf Zahl »

A switchable decoration is just a dumb thing. All actions will normally be done by some external trigger, so you'll need to change that to handle the height - or use a script instead of a direct Thing_Activate invocation
User avatar
ZZYZX
 
 
Posts: 1384
Joined: Sun Oct 14, 2012 1:43 am
Location: Ukraine
Contact:

Re: Height Check for Switchable Decorations

Post by ZZYZX »

Actors can switch on use (+USESPECIAL, either special or THINGSPEC_Switch)

Not sure if this is the case for the author though.
User avatar
Zan
Posts: 338
Joined: Sat Oct 22, 2016 12:43 pm
Location: The depths of Hedon.
Contact:

Re: Height Check for Switchable Decorations

Post by Zan »

ZZYZX wrote:Actors can switch on use (+USESPECIAL, either special or THINGSPEC_Switch)

Not sure if this is the case for the author though.
Yes this is what I'm talking about https://zdoom.org/wiki/Creating_decorat ... )activated
These actors can currently be activated regardless of the player Z axis distance from their position.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Height Check for Switchable Decorations

Post by Graf Zahl »

There's just one tiny little problem here: The entire code to check for stuff to use has absolutely zero concept of height. It's not something that's quickly added without potentially causing secondary issues.
User avatar
Zan
Posts: 338
Joined: Sat Oct 22, 2016 12:43 pm
Location: The depths of Hedon.
Contact:

Re: Height Check for Switchable Decorations

Post by Zan »

Alright, no problem, it can be done with a decorate expression check in any case. Thanks for looking into it anyway!
Post Reply

Return to “Feature Suggestions [GZDoom]”