Page 1 of 1
switching on ambient lights...
Posted: Tue Oct 09, 2012 12:08 pm
by azidahaka
Any idea on how to trigger light? like you step on something and light turns on
Re: switching on ambient lights...
Posted: Tue Oct 09, 2012 12:44 pm
by Kuningas
For light source objects, from the scripting reference:
"
LightSource:activate()
Turns on the light source.
LightSource:deactivate()
Turns off the light source.
"
You can do this just by adding a button or a lever or a pressure plate and connecting it to the light source in the editor, so no actual scripting is required.
But I suppose it is a bit different for completely scripted lights, not light-source objects. Someone probably knows them well around here, though.