Turning a light on and off
by Caleb · in Technical Issues · 06/01/2007 (7:51 am) · 2 replies
Hi all. I've come across a problem when I try to toggle my light on and off, I was using:
As a test, I drop the swinging light from starter.fps kit into the world, gave it a name, and toggled it on and off a few times to make sure it worked. Everything worked great until I saved the mission, quit, and came back in. Now the lights won't turn on and off! The only way for me to toggle a light, is to create a new one ever time I load the mission.
Is there something I'm missing? Is there a better way to toggle a light?
Please help!
function volumeLight::enable(%this)
{
%this.setEnable(true);
%this.setScale(%this.getScale());
}and,function volumeLight::disable(%this)
{
%this.setEnable(false);
%this.setScale(%this.getScale());
}To toggle my lights on and off.As a test, I drop the swinging light from starter.fps kit into the world, gave it a name, and toggled it on and off a few times to make sure it worked. Everything worked great until I saved the mission, quit, and came back in. Now the lights won't turn on and off! The only way for me to toggle a light, is to create a new one ever time I load the mission.
Is there something I'm missing? Is there a better way to toggle a light?
Please help!
#2
As it turns out, the volume light that I was using, was a static light. I've now added a dynamic light, and all works fairly well.
06/07/2007 (6:03 am)
Thanks for the reply John.As it turns out, the volume light that I was using, was a static light. I've now added a dynamic light, and all works fairly well.
Torque Owner John Kabus (BobTheCBuilder)