Game Development Community

Mount Issue

by Jonathan Noyola · in Torque Game Builder · 04/24/2010 (10:21 pm) · 4 replies

I have a menu that has a couple buttons mounted to it.
I save the level through script, and then reload it later using
exec("~/scene.t2d");
sceneWindow2D.setSceneGraph(%levelContent);
After the scene is reloaded, the buttons are no longer mounted to the menu.
The menu will move, but the buttons will remain in place.
Any help is appreciated.
-Jon

About the author

I've been programming for 10 years now. Proficient in many programming languages. Stanford '16: BS CS, BS Math, MS CS (Artificial Intelligence). Favorite games: GW2, LoL, Borderlands, NWN2


#1
04/27/2010 (4:52 am)
You should probably mount the buttons after the scene is loaded.
#2
04/27/2010 (9:13 pm)
Is it possible to say which link point I want to use in script, or do I just have to use X and Y offsets?
#3
04/28/2010 (5:26 am)
It may be possible. However, I always use the offsets. One thing I discovered the hard way about mounting in script is that you want to change properties after the mount call. For some reason, certain properties are reset to default during the mount process.
#4
05/04/2010 (4:57 pm)
As an answer to my own question and help to anyone else, you can look at www.torquepowered.com/community/forums/viewthread/59955 for how to mount an object to an object's link point.