Page 1 of 1

trigger_hurt peculiarities

Posted: Sun Jun 05, 2016 9:13 pm
by RojaN Returned
Hi, all. Just went through some bizarre business that I thought could be useful.

I have a trigger_hurt entity that is activated by a switch and later deactivated by a target_delay (itself initiated by the same switch). The idea is that the coolant pool room is made deadly by the lowering of elements from the ceiling (sort of an inverse to reality, where nuclear rod assemblies get overheated when OUT of the water). The switch is thrown, and an alarm sounds, you hear massive hydraulics engage, the elements lower from the ceiling and into the water, and you need to be somewhere else or you die. Twenty seconds later, the elements rise with more hydraulic sounds, and the room becomes safe.

Under the hood, all this is achieved by the button triggering a trigger multiple, which targets a host of items @ targetname t200: the elements that lower are func_doors with a ridiculous lip value and a 20-second wait; the klaxon is a global target_speaker, while the hydraulics are passed through a relay/delay pair, the relay plays the sound on lowering, the delay 27 seconds later as they rise (don't ask me why the extra 7 seconds). I'm going to add a warning light soon, maybe an "all clear" sound for the raising.

The funny bit is with the target_hurt. Spawnflags for START_OFF and TOGGLE seem right, but did the polar opposite of expectations: the room is deadly until the switch is thrown. After trying in vain to play with keys and spawnflags I just threw in a trigger_always, which produced the desired result. On going over the notes in the entity definition, I noticed this oddly contradictory line:
Triggering a trigger_hurt will have no effect if the START_OFF spawnflag is not set. A trigger_hurt always starts on in the game.
So it seems START_OFF is first misnamed, second is really just an enabler for TOGGLE, rather than an independent feature. Am I wrong? Did I do something to mess this up, or should the docs be more clear on this point?

My gizmo is working, but I'd like to understand this better.

Re: trigger_hurt peculiarities

Posted: Mon Jun 06, 2016 11:46 am
by Eraser
The START_OFF and TOGGLE spawnflags on trigger_hurt are bugged. The spawnflags shouldn't have been made available in Radiant.

Re: trigger_hurt peculiarities

Posted: Sat Jun 25, 2016 4:45 am
by RojaN Returned
Eraser wrote:The START_OFF and TOGGLE spawnflags on trigger_hurt are bugged. The spawnflags shouldn't have been made available in Radiant.
From a developer's perspective, perhaps.

For my own part, I'm glad I was able to make my mechanism work. Absent the spawnflags, I don't know if I could have.

Re: trigger_hurt peculiarities

Posted: Sat Jun 25, 2016 3:14 pm
by sst13
TOGGLE works fine!
I used this for my self made lightning shooter in 13tomb.
Only the START_OFF flag doesn't work. But instead you can simply connect a trigger_always to the trigger_hurt. It will turn him off when the map starts or restarts.

Re: trigger_hurt peculiarities

Posted: Tue Jun 28, 2016 3:39 am
by coltonquake3
Someone might wanna fix them up if they haven't already in ioq3...