Multiple Lights Switchable from 1 Switch?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
WhiteEcko
Lance Corporal
Posts: 21
Joined: Thu Dec 09, 2004 4:28 am

Multiple Lights Switchable from 1 Switch?

Post by WhiteEcko »

I am wondering if this is possible. What I tried hasnt worked, however.

Ive done the switchable lights tut already, so I know how that works. However, that tut only used one "light", right? so what about when I use a 5 bulb lamp, and try to have 5 different lights switchable by one switch.

I've already tried duplicating the lights and coronas 5 times and placeing them, but when I tried it, only the one light I had originally used for following along the tut worked. (All the others wouldnt even light up, and the coronas still show).

What would I have to add to the script to get this working. Would I have to make new targetnames for each of the coronas/lights, such as corona2, corona3, and then reflect that into the script?

Please help me get this working... i would post the script i have now but i dont have access to the computer its on right now... also, its my first time scripting without a tut so please be gentle...
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

that's because the editor changes the targetnames each time you clone. change their targetnames individually and then it'll work ;)
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

When you get the script maybe post it I am not sure what tut you did more info would help us help you .
Image
WhiteEcko
Lance Corporal
Posts: 21
Joined: Thu Dec 09, 2004 4:28 am

Post by WhiteEcko »

lizardkid wrote:that's because the editor changes the targetnames each time you clone. change their targetnames individually and then it'll work ;)
Soooo I'll have to give induvidual names to each item, (such as light1, light2, corona1, corona2) and then represent that in my script?

such as where in the scr it says

Code: Select all

$light light 1 1 1 206
I'll have to add to the lines below it $light2 light 1 1 1 206, $light3 light 1 1 1 206, and so on?

And where its says $corona show/$corona hide, ill have to add the lines $corona2 hide/show, etc etc...



Sooo, am I on the right track atleast? :?
[/code]
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

well, you could do it that way; It's kinda messy, it'd probably be better to just targetname and one line. what i meant is that the editor, when you clone something, automatically changes the targetnames to t1, t2, t3, t4 etc. So you need to manually change them all to light.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

if you use $targetname as the key instead of targetname it will keep the targetname when cloned if you do that with pathnodes you can give them a color when you press k
Image
WhiteEcko
Lance Corporal
Posts: 21
Joined: Thu Dec 09, 2004 4:28 am

Post by WhiteEcko »

lizardkid wrote:that's because the editor changes the targetnames each time you clone. change their targetnames individually and then it'll work ;)
Ok, I'll go that way than.

I'll let you guys know if it works. It's been nice of you guys for helpin a little nub like me :)
WhiteEcko
Lance Corporal
Posts: 21
Joined: Thu Dec 09, 2004 4:28 am

Post by WhiteEcko »

Ok... I renamed all the script objects/origins like I said I would, and it works like a charm :D. Thanks for all the help guys...

But I have another problem now (check the mapping section, if you can)...
Post Reply