How to get the Level Builder to place items in a specific scene?
by Spencer Grey · in Torque Game Builder · 06/16/2006 (10:33 am) · 9 replies
Hey,
Is there anyway to assign objects to a specific scenegraph using the level builder? So far I've been doing everything in script, but thats not exactly the most effecient way to built large maps.
I have two t2dSceneWindows going, one for my main screen and one for my inventory. How do I get the objects I place in the level builder to show up in those?
Thanks
Is there anyway to assign objects to a specific scenegraph using the level builder? So far I've been doing everything in script, but thats not exactly the most effecient way to built large maps.
I have two t2dSceneWindows going, one for my main screen and one for my inventory. How do I get the objects I place in the level builder to show up in those?
Thanks
#2
Thanks a bunch!
One more thing. Is there anyway to reference that in script, so I can manipulate it like any other scenegraph? Would I just use the .getCurrentScene() or whatever it is?
06/16/2006 (10:43 am)
Heh, thanks. Now if only I had asked that question a few days earlier, I wouldn't have had to size and place everything in script. Thanks a bunch!
One more thing. Is there anyway to reference that in script, so I can manipulate it like any other scenegraph? Would I just use the .getCurrentScene() or whatever it is?
#3
06/16/2006 (10:48 am)
T2dSceneWindow::getSceneGraph() is what you want ;)
#4
06/16/2006 (11:13 am)
Thanks. I guess its time to get over my level builder phobia and give it a shot.
#5
06/16/2006 (11:19 am)
You won't regret it. If you design your code with the level builder in mind you can safe tons of time.
#6
When I place an object in the level (say a door), how do I set its Config Datablock to a datablock I've created in my script? Its not seeing it, so I'm assuming that theres a specific place I need to put it.
06/16/2006 (11:24 am)
Gah, already ran into a roadblock.When I place an object in the level (say a door), how do I set its Config Datablock to a datablock I've created in my script? Its not seeing it, so I'm assuming that theres a specific place I need to put it.
#7
06/16/2006 (11:47 am)
The script file your config datablock is in must be already exec()ed. If you put a exec() call with the script file in your game.cs it should work. Other than that it should work.
#8
06/16/2006 (11:55 am)
Makes sense... Thanks.
#9
06/16/2006 (1:41 pm)
Also, all of the loadLevel and addToLevel functions return the level's scenegraph. Nothing wrong with calling getSceneGraph(), just might be a little cleaner to grab the return value.
Torque Owner Michael Woerister