On/Off switch
-
Hello, I'm from Norway and my English writing is not so good, but I'll try.
I'm trying to use the "onClick" function to turn the light On/Off. Animating the light-group it self is no problem.
But I want to use the switch i have created, on the wall, to activate the light. Can someone help me out here? -
If you make a component with the switch on the wall and the lightbulb, then add an onclick function to the switch which turns the light on/off.
Unfortunately its quite hard/impossible to make 2 separate DCs talk to each other.
-
The components can talk to each other - but it's a bit different. Click on the block with a hole in this example with the interact tool to see how I made it work.
Set the onclick attribute of the switch to the following:
Animate("Switch_RotZ", angle1, angle2); Animate("Light!Material", Material1, Material2).
Doing this will work, even if the light is not in the component with the switch. The problem becomes importing and adding extra copies, but it is doable.
Mark
It's the game of telephone! Except this time the message isn't a bad name about the teacher...
Advertisement