I am in need of some help.
I want to make a custom ALL LIGHTS ON/OFF switch, and tried the code below, following another thread on these forums.
First, I used
the switch then animates at the first CLICK to theON position, but it stays on. It never switches off. Even when I click on it
Second, when i try to add the EVENT ID,
ALL_LIGHTS_TOGGLE
so I get
Then, it all stops working
What am i doing wroing?
I want to make a custom ALL LIGHTS ON/OFF switch, and tried the code below, following another thread on these forums.
First, I used
<PartInfo>
<Name>switch_ALL_light</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>
(L:MySwitch,bool) 50 * (* we multiply the L:variable by 50 *)
</Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<CallbackCode>
(L:MySwitch,bool) ! (>L:MySwitch,bool) (* this toggles off/on *)
</CallbackCode>
</MouseRect>
</PartInfo>
the switch then animates at the first CLICK to theON position, but it stays on. It never switches off. Even when I click on it
Second, when i try to add the EVENT ID,
ALL_LIGHTS_TOGGLE
so I get
<PartInfo>
<Name>switch_ALL_light</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>
(L:MySwitch,bool) 50 * (* we multiply the L:variable by 50 *)
</Code>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<CallbackCode>
(L:MySwitch,bool) ! (>L:MySwitch,bool) (* this toggles off/on *)
</CallbackCode>
<EventID>ALL_LIGHTS_TOGGLE</EventID>
</MouseRect>
</PartInfo>
Then, it all stops working
What am i doing wroing?


