[SP] - triggering dlights


(kat) #1

I’ve been wraking my brains on this one…
It’s part of the ‘uber crane’ : I’ve got two dlights placed one at the top and one at the bottom of the crane. The effect I’m after is to have the dlights activated and blink on/off by either switch so by pressing the bottom or top switch a warning light comes on.

I know I can ‘kill’ the target to stop the light (which is/was to be triggered by the end move of the crane script thus light stops when the crane stops) but does that mean the entity is killed outright, it’s ‘removed’ from the game?? Once you ‘kill’ a target can it be respawned?? so it can be used again (in this case by someone pressing the button [or from with in the script] to activate the crane again??)

[EDIT]I just noticed the ‘one_time’ flag which could be used for short timed sequences where the stylestring is no longer then say 24 character (2.4secs)… is there a limit on how many characters can be used


(kat) #2

ok… I think I’ve found a solution that makes use of the ‘one_time’ flag. Because the one_time flags shuts itself down on finishing a sequence it can be re-triggered every couple of seconds (depending on the number of character used in the stylestring - 10/sec) to give a effect that lasts as long as we like without spawning/re-spawning/killing a number of entites…

Just trying this out now… not very scientific but… it may… just… work, damn it Spock…


(sock) #3

In the original SP rocket map they had red dlights on some of the red/cage lights around the place. They are activated/deactivated by a “target_relay” which is switched on/off via the script.

(line 355) alertentity v2_lights

I would have to create a test map to confirm the above so have a check with your map first and let me know.

Sock
3D Brush Monkey


(kat) #4

if our dlight is ‘off’ (needs trigger alerting) by default does that mean our 1st trigger alert (via a relay) will switch it on and then making a simple second trigger ‘alert’ (via another relay) call will switch it off?! It can’t be that easy can it?!?!!?!

It’d be easier to do the way you’ve mentioned as you have to muck about with the script a bit to get it to work - working around the event rather than letting the event itself trigger the lights


(sock) #5

On 2002-09-04 00:25, kat wrote:
if our dlight is ‘off’ (needs trigger alerting) by default does that mean our 1st trigger alert (via a relay) will switch it on and then making a simple second trigger ‘alert’ (via another relay) call will switch it off?! It can’t be that easy can it?!?!!?!

Yes it should be that easy and it certainly switches on via “alertentity” to target_relay so it should switch off via a target_relay.

Sock
3D Brush Monkey


(kat) #6

.Yes it should be that easy and it certainly switches on via “alertentity” to target_relay so it should switch off via a target_relay.

Sock
3D Brush Monkey

it works…!
It seems to work better if the dlights are by default on (so they flash) BUT then switch them off by a trigger when they spawn - the trigger event being in the spawn section of the script (which is just an ‘alertentity’ call).

To activate and switch them on they just need another ‘alertentity’ call… well bob’s me uncle…! it was that simple…!!

tnx for the hint Mr Sock…


(sock) #7

On 2002-09-06 13:04, kat wrote:
well bob’s me uncle…!

What djbob’s your uncle! :wink:

Sock
3D Brush Monkey


(digibob) #8

Shhh… dont let everyone know…


(kat) #9

:wink:

[EDIT]dead link removals