Activating a PointLight as part of a schedule using a trigger.
by Luke Griffin · in Torque 3D Professional · 02/25/2011 (4:25 am) · 3 replies
Hey all
Im having another little problem. I'm working on a scene where the level loads up and the player recieves a message over the radio. Once this is complete a door is opened and the pointlight above the door is enabled. I have the door and sound working but I cant find the correct line for the light. I have tried quite a few including:
light1.schedule(5000, "On");
light1.schedule(5000, "Enabled");
light1.schedule(5000, "isEnabled");
and even
light1.schedule(5000, "setLightEnabled(true)");
I just cant seem to get it working. also, I am using a trigger to start these events off but they seem to start while the loading screen is still active. As this could be different depending on the type of computer "and the time it takes too load", is there a way to get the trigger to fire only when the scene is rendered and the loading screen has gone?
Im having another little problem. I'm working on a scene where the level loads up and the player recieves a message over the radio. Once this is complete a door is opened and the pointlight above the door is enabled. I have the door and sound working but I cant find the correct line for the light. I have tried quite a few including:
light1.schedule(5000, "On");
light1.schedule(5000, "Enabled");
light1.schedule(5000, "isEnabled");
and even
light1.schedule(5000, "setLightEnabled(true)");
I just cant seem to get it working. also, I am using a trigger to start these events off but they seem to start while the loading screen is still active. As this could be different depending on the type of computer "and the time it takes too load", is there a way to get the trigger to fire only when the scene is rendered and the loading screen has gone?
#2
02/25/2011 (1:56 pm)
Again Steve your a hero, works like a dream. Is there anyway to get the engine to hold off on the firing of triggers ect until the loading screen has gone? or would it just be best to put in a small, say five second, delay and call it that?
#3
02/25/2011 (2:25 pm)
Timed delays are the wrong way to go...probably better to trigger it off something else than a trigger (some client connected / entered world callback?)
Associate Steve Acaster
[YorkshireRifles.com]
and
You'll want:
If the client is on the same box as the server it'll load the player before clearing the loading screen.