Ok, using multiple geds for different levels is pretty simple. To jump between ged files, all you need to do is use LoadGame.
- Code: Select all
LoadGame("level_01.ged");
That code would try to load the level_01 game file. Each game file can be run independently (since they are currently .ged files) so whichever file you happen to be editing is technically the first level. But, when you export the games, only the first ged file should be exported as an exe. Normally this would be the menu for your game. To start actually playing your game, you would then jump to another file (your real first level).
play_game -> Mouse Button Down -> Script Editor
- Code: Select all
LoadGame("level_00.ged"); // this will jump you to the first level when you press play
Now one very important thing to know when starting out with gE is how events work. Everything is based around events. So if you want something to happen, you just need to find an event that triggers at that time. For instance if you want the player to move when you press right, then you should add a keydown event. In your case you are asking how to make it so you can move to the next level.
If we were dealing with mario, then when he collides with the flag, you would want it to load the next level. So, you can add a collision event with the flag, that uses the LoadGame code.