I have a basic script for getting a switch to trigger a light (will post it at the end). But I have a few questions. I was wondering if there are any tips to getting 1 switch to turn on multiple lights, as well as toggling the glow effects related to them. Also, I'm having trouble actually linking to the light even with a 1-1 connection. I've tried going to the enable parent tab and using select reference in render window, both ways (either selecting the light and trying to ref the switch, or selecting the switch and trying to reference the light, both result in only red crosshairs). I am relatively new to all of this, any help would be greatly appreciated.
edit:after tinkering a bit it seems there is a way to do this without any scripts. but I have a new problem. I am able to assign all the lights I want controlled to use the switch as a parent, but when I hit the switch, it vanishes. o_O
ScriptName LightSwitchScript
ref light
Begin onactivate
if light == 0
set light to GetLinkedRef
endif
if light.GetDisabled
light.Enable
else
light.Disable
endif
Activate
End