How to hide/unhide object on the fly?
by Yu Qingjun · in Torque Game Engine · 11/06/2006 (1:53 am) · 5 replies
Is it possible to hide and unhide a dts model in game dynamiclly?
(not remove from the scenegraph)
Any help appreciated.
(not remove from the scenegraph)
Any help appreciated.
#2
This link should be able to help . . .
www.garagegames.com/mg/forums/result.thread.php?qt=32585
11/06/2006 (5:11 am)
Hello,This link should be able to help . . .
www.garagegames.com/mg/forums/result.thread.php?qt=32585
#3
The idea is easy to wrap my head around, but is there a resource that would explain the syntax for some of this?
Matt
USC IMD
11/13/2006 (7:41 pm)
When you say stop rendering it is this something I can control with trigger events? For example I want to make a ring puzzle, where you swim through a set of rings and as you go through each ring the next one appears and the one I just swam through disappears. I'm assuming from what you're saying I would build the level with all the rings there, but set them to be not rendering by default, and then have a series of triggers to control them?The idea is easy to wrap my head around, but is there a resource that would explain the syntax for some of this?
Matt
USC IMD
#4
%myObject.startFade(2000, 0, true);
%myObject.schedule(500, setHidden, true);
oops someone already posted a link with basically the same thing.
11/13/2006 (9:10 pm)
You can fade it out...then hide it - make a trigger and when u pass thru it hide the correct object... put them into the same sim group (the trigger & the ring), then when you pass through the ring it triggers the object in the sim group (you have to set the trigger up for this and have multipule sim groups for each ring & its trigger). That way you just have one script that does all the work. %myObject.startFade(2000, 0, true);
%myObject.schedule(500, setHidden, true);
#5
11/15/2006 (4:03 pm)
I would follow Stefan's remarks remarks regarding not to scope to the client. That uses the built in automated/implicit system of torque to remove an object from teh scenegraph. Ghost it again when you want to bring it into view. Only question I would have about that approach is how would it work for ScopeAlways objects i.e. InteriorInstances?
Torque Owner Stefan Lundmark