10 Searchlights - on to off using one switch
Moderator: Moderators
10 Searchlights - on to off using one switch
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!
"We must become the change we want to see in the world" (Mahatma Gandhi)
-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact:
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.
////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.
Desert-Eagle
....The Eagle Has Landed...
....The Eagle Has Landed...
$light
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.
