Height Check for Switchable Decorations

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

Moderator: GZDoom Developers

Height Check for Switchable Decorations

Postby Zan » Fri Jul 06, 2018 4:08 am

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
Zan
 
Joined: 22 Oct 2016
Location: The depths of Hedon.

Re: Height Check for Switchable Decorations

Postby Graf Zahl » Sun Jul 08, 2018 2:15 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Height Check for Switchable Decorations

Postby ZZYZX » Mon Jul 09, 2018 8:47 am

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

Not sure if this is the case for the author though.
User avatar
ZZYZX
le chat du rabbin
 
 
 
Joined: 14 Oct 2012
Location: Ukraine

Re: Height Check for Switchable Decorations

Postby Zan » Mon Jul 09, 2018 4:01 pm

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 ... can_be_(de)activated
These actors can currently be activated regardless of the player Z axis distance from their position.
User avatar
Zan
 
Joined: 22 Oct 2016
Location: The depths of Hedon.

Re: Height Check for Switchable Decorations

Postby Graf Zahl » Mon Jul 09, 2018 4:11 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Height Check for Switchable Decorations

Postby Zan » Tue Jul 10, 2018 2:45 am

Alright, no problem, it can be done with a decorate expression check in any case. Thanks for looking into it anyway!
User avatar
Zan
 
Joined: 22 Oct 2016
Location: The depths of Hedon.


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest