Proximity sensor Created 18 years ago2006-05-31 07:05:59 UTC by darkphoenix_68 darkphoenix_68

Created 18 years ago2006-05-31 07:05:59 UTC by darkphoenix_68 darkphoenix_68

Posted 18 years ago2006-05-31 07:05:59 UTC Post #182876
Hi all,

I'm trying to create a proximity sensor, such that when you enter a certain area an event can be triggered on, and when you leave the area the event is triggered off.

Specifically I want to switch a light on and off (among other things).

I've played around with the method for creating proximity doors (trigger_multiple repeatedly triggering a momentary_rot_button which targets a momentary_door -- which actually didn't work too well last time I tried to use it to build a door; it seems to have problems if the speed is too high. But that's a separate issue!) I figured that since the momentary_door has "target" and "fire on close", I could use them to turn the lights on and off. That didn't work, though...

Is there another way to achieve this? Something I'm missing? Has anybody successfully gotten this sort of thing to work?

Cheers,
Pete.
Posted 18 years ago2006-05-31 07:23:14 UTC Post #182881
Posted 18 years ago2006-05-31 07:58:24 UTC Post #182889
Thanks. Interesting method. As I understand it, it's two triggers, of which only one is active at a time, as controlled by state of the multisources, and the mm toggles back and forth between the two states.

I think if I were trying that, I'd have placed the triggers closer together and have each one target a trigger_relay -- but I'd need to test it to see if it would work the same way.

Perhaps I should have mentioned that I want to do this in a DM environment -- and specifically, therefore, if the player within the proximity zone should happen to die or be killed, the lights would then be switched off just as if the player had left the zone voluntarily. Which this method, interesting though it is, would not achieve... (Also, if a second player triggered the "Close" sequence after the first player triggered the "Open" sequence, these doors would close with both players within the proximity zone...)

;-)
Posted 18 years ago2006-05-31 10:16:42 UTC Post #182911
Spirit has a specific entity just for these that works wonders. It's called, trigger_inout..
This entity works so that, it triggers an object when you walk into the area, and when you walk out out the triggers area, it triggers an object.
Unbreakable UnbreakableWindows 7.9 Rating!
You must be logged in to post a response.