10 Searchlights - on to off using one switch

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
m4rine
Major General
Posts: 714
Joined: Fri Apr 11, 2003 5:28 pm
Location: UK

10 Searchlights - on to off using one switch

Post 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?

:D 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:

Post 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.
Desert-Eagle
....The Eagle Has Landed...
m4rine
Major General
Posts: 714
Joined: Fri Apr 11, 2003 5:28 pm
Location: UK

Post by m4rine »

thanks

8)
"We must become the change we want to see in the world" (Mahatma Gandhi)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

$light

Post 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.
Tom Trude,

Image
Post Reply