Using Multiple Switches To Turn On/Off Lights

By Macros56

I know there is another tutorial here, but it is harder and doesn’t work as well. It prevents you from using the switches correctly. It uses an inverter and the inverter messes with the way the switch works (it works backwards.)

The best way to do this is put on light in a room. Place a VicLightSwitch (Gizmo>Switches>Levers) next to it. Duplicate that switch, and put it next to the previous one.

Add the property to the light (Renderer>AnimLight). To have the light on at first, set it to Maximum Brightness, to off, set it at minimum brightness. Add values for the total light (default is 125, but I prefer 75 – 100). Add a radius if you are putting the light in a large room. A good radius is between 15 – 30. Remove the regular Light property. If you don’t, the light will turn off, but it will still have light on it. Add the Script “AnimLight” (S>Scripts)

Now, link the first switch to the light using the “ControlDevice” link. Then, link the two switches to each other using the “FrobProxy” link. Make sure each switch is linked in two ways – the first to the second, then link the second to the first. You’re done! To add more lights, just link them to the first switch.

To play with how the lights turn on and off, change the settings for the switches in the “JointsState” property. I don’t entirely understand how that works. I do know to have the lights on properly, have AnimS “On” and Joint1AnimS “On”. I suppose to make them off, you would have AnimS “On, Reverse” and Joint1AnimS “Reverse”.

About this entry