Modifying TxScene at Runtime
by Diego Santos Leao - GameBlox Studio · in Torque X 2D · 11/23/2009 (10:06 am) · 1 replies
Hi, Is there a way to add a sprite in my txScene from inside my game?
For example, I do a clone at runtime and I want this clone to be saved in my txScene. So, when I open my txProject, the new cloned object will appear..
I was thinking in something like that:
txScene.Add(myClonedSceneObject);
Thanks..
For example, I do a clone at runtime and I want this clone to be saved in my txScene. So, when I open my txProject, the new cloned object will appear..
I was thinking in something like that:
txScene.Add(myClonedSceneObject);
Thanks..
About the author
Creative director at Gameblox Interactive, a game studio focused on downloadable games and advergames. www.gameblox.net - contact@gameblox.net.
Torque Owner Duncan Colvin
If I was trying to insert an animation or some such into the scene file then I'd probably have my program read the scenefile xml and insert the xml for an animated sprite itself, then save the file - it's easy enough to find out what xml is required by looking in an existing scenefile, and inserting a new node into xml is relatively easy to do.