Difference between revisions of "Light switch tutorial"

136 bytes added ,  19:32, 13 February 2009
Added screenshots of the switch in game
imported>Puf the majic dragon
m (Added summary of collision properties for the activator)
imported>Puf the majic dragon
(Added screenshots of the switch in game)
Line 69: Line 69:
== How It Works ==
== How It Works ==
When you enter the game and approach the switch, the lights will be off. By activating the switch, which will be the "off" switch, it disables itself which automatically enables the "On" switch. The "On" switch can be activated repeating the process in reverse. Now by parenting all of your light sources to either switch, they will be enabled or disabled (turned on or off) according to which switch is enabled or disabled. Any number of light sources or other objects can be added to the switch simply by parenting them to the switches or daisy-chaining them together without ever editing the script. Also, you can select the switches and light sources in the render window and duplicate them (ctrl+d) and move the copies anywhere you wish and the copied lights will work with the copied switch without any additional editing.
When you enter the game and approach the switch, the lights will be off. By activating the switch, which will be the "off" switch, it disables itself which automatically enables the "On" switch. The "On" switch can be activated repeating the process in reverse. Now by parenting all of your light sources to either switch, they will be enabled or disabled (turned on or off) according to which switch is enabled or disabled. Any number of light sources or other objects can be added to the switch simply by parenting them to the switches or daisy-chaining them together without ever editing the script. Also, you can select the switches and light sources in the render window and duplicate them (ctrl+d) and move the copies anywhere you wish and the copied lights will work with the copied switch without any additional editing.
 
[[Image:Lighttutgame1.jpg|thumb|left|The switch turned off in game]]
[[Image:Lighttutgame2.jpg|thumb|left|The switch turned on in game]]