Page 1 of 1
10 Searchlights - on to off using one switch
Posted: Wed Apr 16, 2003 7:08 pm
by m4rine
how do you script something so that 1 switch turns off all the searchlights (about 10 of them) how do you do this?

i am useless at scripting so please help!
Posted: Fri Apr 18, 2003 7:33 pm
by Desert Eagle
you will need to give all the searchlights the same targetname. And using a trigger you shoud be able to turn them (or better yet replace them with the search light model off one)
////sone info
//targetname of lights on model: light
//targetname of lights off model: nolight
//targetname of trigger: lightswitch
//script
$nolight hide
thread the_lights
the_lights:
//wait until the trigger is hit then turn off lights
$lightswitch waittill trigger
$lightswitch thread the_lights_off
end
the_lights_off:
$light delete
$nolight show
end
Off course the lights will stay off with this. Also not 100% this will work. Best thing I have learned is search the forums, try alot of things yourself and ask questions.
Posted: Fri Apr 18, 2003 8:19 pm
by m4rine
thanks
8)
$light
Posted: Sat Apr 19, 2003 11:47 am
by tltrude
I'm not sure "light" is the best targetname for the on spotlights--the game probably uses that name a lot. "onlight" may be better. Also I don't know if "delete" will work, but I know "remove" does.