Shootable switch only activate on hitting lower?

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Shootable switch only activate on hitting lower?

Re: Shootable switch only activate on hitting lower?

by Enjay » Fri Mar 27, 2020 3:30 am

Oh yes, I know about that feature and have even pointed people to the demo file before. Its lack of uptake, possibly due to lack of editor support, means it's easy to forget about, despite it being a potentially very useful feature.

Some UDB support and proper documentation would really help

Re: Shootable switch only activate on hitting lower?

by Nash » Fri Mar 27, 2020 12:27 am

I feel like ZZYZX's "destructible geometry" feature is exactly what this can solve, however, shortly after implementing it into GZDoom, he forgot to expose the editor to it... :P

This is a feature silently implemented into GZ a while back that basically gives lines and actors health values and callbacks (you are able to individually "damage" them, and they get to do things and call scripts, things like that). Unfortunately this is as far as I know; it really is an obscure (although mostly complete) feature.

I'll see what I can dig up later, if no one else beats me to it.

Re: Shootable switch only activate on hitting lower?

by Matt » Thu Mar 26, 2020 5:41 pm

tired: replying after failing to read the entire post

inspired: independent verification

Re: Shootable switch only activate on hitting lower?

by Apeirogon » Wed Mar 25, 2020 3:50 pm

There are also world line (pre)activated event which can do this (check height from floor to actor-activator).

Re: Shootable switch only activate on hitting lower?

by Enjay » Wed Mar 25, 2020 2:45 pm

Yup. me too:
Enjay wrote:As a work-around, I've put a low HP very short actor in front of the switch that can be shot and when it dies, it runs a script.
;)

Re: Shootable switch only activate on hitting lower?

by Matt » Wed Mar 25, 2020 2:19 pm

The only way I can see this done is to have a scripted shootable actor in place of (or invisible and directly in front of) the switch...

Re: Shootable switch only activate on hitting lower?

by Enjay » Mon Mar 23, 2020 5:55 pm

Gez wrote:the height check is only implemented for use
That explains why the switch height check didn't work, thanks.

The portal idea is cunning but unnecessarily complex for the situation in my map. If the height check can't work, then my little invisible actor sitting in front of the switch will do the job just fine.

Re: Shootable switch only activate on hitting lower?

by Gez » Mon Mar 23, 2020 5:52 pm

No, it's not a bug, the height check is only implemented for use -- it's ignored for cross and impact activations.

A potential workaround if using portals. With a floor/ceiling portal, you can have the lower area be a technically separate part of the map, and so the line will only exist in the lower area, not in the upper one. Of course this solution may not be easy to integrate in an existing map.

Re: Shootable switch only activate on hitting lower?

by Enjay » Mon Mar 23, 2020 5:50 pm

Nope, lines have always behaved like that. Go to map 18 of Doom 2, shoot the door to open it then shoot through the door - every time you do, you can hear the switch activate. It was like that in Doom2.exe I'm trying to find a way that does something different to that vanilla behaviour.

Re: Shootable switch only activate on hitting lower?

by axredneck » Mon Mar 23, 2020 5:47 pm

Then maybe it's a bug of GZDoom

Re: Shootable switch only activate on hitting lower?

by Enjay » Mon Mar 23, 2020 5:31 pm

I'm sorry, I'm not sure what you mean by that - or maybe I didn't explain properly. So, here's a picture:

Image

The red line on the front of the blue box is the activatable line. An observant player can spot the switch inside the black structure, fire through the gap and hit the switch (green arrow).

However, it is just as likely that the player will fire over the top of the black structure for whatever reason (purple arrow) and this will also activate the line with out the player perhaps even realising that there was a cunning hidden switch under there.


As a work-around, I've put a low HP very short actor in front of the switch that can be shot and when it dies, it runs a script. However, I'd still like to know if the original idea (lower wall activation only) is possible.

Re: Shootable switch only activate on hitting lower?

by axredneck » Mon Mar 23, 2020 4:50 pm

Make the switch a separate sector/linedef.

Shootable switch only activate on hitting lower?

by Enjay » Mon Mar 23, 2020 3:58 pm

Yup, that was a mess of a title!

Is there any way to make a shootable switch that only activates if the lower part of the sidedef is hit?

I have a small pedestal made from a sector that rises 32 units above the surrounding floor. On the lower side is a switch texture and the switch is partially obscured by a 3D floor above it. I want the player to be spot the cunningly hidden switch and be able to shoot it to find a secret. However, in normal combat, the player is quite likely to shoot at something, firing across (above) the 3D floor and this activates the switch too.

I have set the "Switch Height Check" flag in UDMF but that hasn't stopped the problem. So, can what I want be done?

Top