Liandri

The forum offers unofficial support for UnrealEd users and serves as a comfortable rest-room for a friendly community.
 
HomeFAQRegisterLog in

Share | 
 

 Triggerable light that stays on for a limited time

View previous topic View next topic Go down 
AuthorMessage
Murphy



Posts : 147
Join date : 2008-10-18
Age : 29

PostSubject: Triggerable light that stays on for a limited time   Thu Jul 23, 2009 8:53 am

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

First, here is how to create a light that can be switched on and off by pressing Use somewhere (typically in front of a light-switch of an electrical fuse box or whatever):

Place a TriggerLight. Change it's lighting settings to your liking.
Change Object -> InitialState to TriggerToggle.
Change Events -> Tag to SwitchHit (or something else you can remember).

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

Now on to making it turn itself off after a certain amount of time (while you can still turn it off manually!):

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
[1] Action_WAITFORTIMER
The time the light must stay on in seconds (I have 5 in the example map).
[2] Action_TriggerEvent
SwitchHit.
[3] 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 an example map (for Killing Floor):
http://rapidshare.com/files/254673290/TriggerLightExample.rom
Back to top Go down
View user profile
 
Triggerable light that stays on for a limited time
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Metro Last Light for Wii U not confirmed anymore
» Virtual Console: Three NES Light Gun Games Are Set To Arrive On Wii U In North America On Thursday.
» flickering in vision as if someone flicked a light on and off?
» Truck-Lite Off-Road Lighting Contest
» Update! Hyper Light Drifter Has Smashed Past Its Wii U Stretch Goal!

Permissions in this forum:You cannot reply to topics in this forum
Liandri :: = Tutorials :: UnrealEngine 2-
Jump to: