Questions about Triggers and Hidden function
by NiN-NiN · in Torque 3D Beginner · 10/27/2013 (5:29 pm) · 3 replies
Hi All
I am curious I was testing out something last night on Torque and had a trigger than would turn off the hidden check box on some tsstatic shapes in the level.
I popped up into errors where it worked properly when I set it as hidden in the editor and the trigger worked but then when i ran through the game a few times the objects weren't always hidden and the triggers didn't always trigger the hidden field even though the trigger did run.
I can do it fine in the console no issues.
I was doing this on the onEnter command i usually use a script so is this an issue with the onEnter commands you add into the editor?
Also I have a few sounds setup but I am unsure how to play them in script with the trigger I tried searching but it seems i'm finding an old way to deal with sound which doesn't work in 3.0
I am curious I was testing out something last night on Torque and had a trigger than would turn off the hidden check box on some tsstatic shapes in the level.
I popped up into errors where it worked properly when I set it as hidden in the editor and the trigger worked but then when i ran through the game a few times the objects weren't always hidden and the triggers didn't always trigger the hidden field even though the trigger did run.
I can do it fine in the console no issues.
I was doing this on the onEnter command i usually use a script so is this an issue with the onEnter commands you add into the editor?
Also I have a few sounds setup but I am unsure how to play them in script with the trigger I tried searching but it seems i'm finding an old way to deal with sound which doesn't work in 3.0
#2
10/27/2013 (9:34 pm)
It's onEnterTrigger, not onEnter....
#3
I will post the code when I get home but I think it was something simple like: test.setHidden(false);
10/27/2013 (9:45 pm)
Sorry yes that's correct richard I was at work (Still am) when i made the post so i had to go off the top of my head as I don't have access to T3D.I will post the code when I get home but I think it was something simple like: test.setHidden(false);
Torque Owner DreamPharaoh
Gods and Nemesis