Game Development Community

loadScene() not working

by Amjad Yahya · in Torque Game Builder · 11/04/2012 (7:39 am) · 1 replies

It seems I can't make loadScene() to work properly. I use the following code:

$mySceneGraph.saveScene("~/data/levels/level1.scn");

then
$mySceneGraph.schedule(32,"loadScene","~/data/levels/level1.scn");

the game crashes or triggers this error "t2dSceneGraph::loadScene() - Could not Open File '~/data/levels/level1.scn' for Scene-Load."

At some point it worked once, then I couldn't get to work again, although when it worked the objects in the scene have lost their classes and properties.

I appreciate any help, I've searched the forum, but all the topics on this issue are very old.