How do I load a level
by James Ford · in Torque Game Builder · 04/13/2006 (11:19 am) · 6 replies
The first thing I tried to do was create a new project, then make and save a level (which I put in the correct folder). Then I went to my game's main.cs and changed the loadlevel from baselevel.tbs to mylevel.t2d.
1. However it will not load my level and says it was not found. Why is that? Also, what is baselevel.tbs, arent level files .t2d and I dont see a baselevel file anywere anyway.
2. All I get is the GG logo background with no menu, so the only way to exit is to end task...Is there any consol command to close the game?
1. However it will not load my level and says it was not found. Why is that? Also, what is baselevel.tbs, arent level files .t2d and I dont see a baselevel file anywere anyway.
2. All I get is the GG logo background with no menu, so the only way to exit is to end task...Is there any consol command to close the game?
About the author
http://jamesdev.info
#2
04/13/2006 (8:50 pm)
And what is the proper way to load a level... It looks straightforward but i am getting the invalid file error...
#3
04/15/2006 (2:53 pm)
I still need help on this... what is the proper why to load a level in script?
#4
04/15/2006 (3:05 pm)
Keep in mind that changing the level name in the startGame function call in main.cs only works if you disable the level editor. Otherwise hitting the play button (or Run Game) assigns the current level you have open in the level editor to %level as seen below.sceneWindow2D.loadLevel(%level);
#5
sceneWindow2d.loadlevel("~/data/levels/mylevel.t2d");
but this level is not found ?
04/22/2006 (9:42 am)
I disabled the level editor and then I callsceneWindow2d.loadlevel("~/data/levels/mylevel.t2d");
but this level is not found ?
#6
sceneWindow2D.loadLevel("T2D/data/levels/mylevel.t2d");
Or change T2D in the path to whatever main project folder you saved your levels to.
04/22/2006 (9:52 am)
Yeah, I had this problem too. Needs to be:sceneWindow2D.loadLevel("T2D/data/levels/mylevel.t2d");
Or change T2D in the path to whatever main project folder you saved your levels to.
Torque Owner Richard Foge