Jump to content
Sign in to follow this  
hpat

Turning on and off lights via trigger (and other methods)

Recommended Posts

Ok, I've mad a series of lights for a mission with the following code, and need help turning them on and off.

if (isServer) then {this setPos [getPos this select 0,getPos this select 1,1.75]; this setVectorUp [0,0,1]};light1="#lightpoint" createVehicle [0,0,0];light1    setLightBrightness 1.3;light1 setLightAmbient [3,3,3];light1 setLightColor [3,3,3];light1 lightAttachObject [this,[0,0,0]]  

There are some variations in this based on different color lights in different places, but you get the idea - I susspect the solution to my problem won't even involve the code - just the object names, but there it is anyway.

Ok, I have 2 questions about ways to turn them on and off:

1: If a generator object is destroyed - force all lights linked to this system to turn off (Not street lights, though - that's the problem with a less subtle approach - streetlights in the same aera)

2: A switch to turn lights on and off at the players command - either by a radio trigger - or somehow via an option at the generator object.

Thanks in advance for any help.

Edited by hpat
Spelling error

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×