Help:Creating light switches

From Killing Floor Wiki
(Redirected from Mapping:triggerlight)
Jump to: navigation, search

This article requires clean-up , lots of cleanup. Like, seriously.
You can help the Killing Floor Wiki by editing it.

Thanks Murphy source[1]


How to create a light that can be turned on that stays on for only a specified amount of time:

The TriggerLight has a variable called "RemainOn" which sounds like you could set a time there and it would turn itself off after that time, but it didn't work like that when I tested it. I read it up on UDN and it said this only works with InitialState set to TriggerPound, but that didn't work for me either (it stayed on indefinitely).

So here is the more complicated way (if someone knows a shorter way, please post it!)

Place a TriggerLight. Change it's lighting settings to your liking.
Change Object -> InitialState to TriggerToggle.
Change Events -> Tag to SwitchHit
(I used two of them in the example map. They are identical except one of them flickers. This just makes it look nicer)

Place a UseTrigger.
Change its Events -> Event to HitSwitch

Place a ScriptedTrigger (Keypoints -> AIScript -> ScriptedSequence -> ScriptedTrigger)
In its properties, under AIScript, add the following Actions:

[0] Action_WAITFOREVENT
HitSwitch
[1] Action_TriggerEvent
SwitchHit
[2] Action_WAITFORTIMER
The time the light must stay on in seconds (I have 5 in the example map).
[3] Action_TriggerEvent
SwitchHit
[4] Action_Action_GOTOACTION 0

This creates a switch for a light that only stays on for 5 seconds. You can turn it off with the switch at any time and you can turn it back on at any time, but it will only stay on for max 5 seconds.

Here is the example map:
http://www.mediafire.com/?u8j587sgg707ci6