From Newbie: How to use Differnet GED for different Levels

Non-platform specific questions.

From Newbie: How to use Differnet GED for different Levels

Postby ggesterGamePro99 » Mon Apr 16, 2012 1:34 pm

Total newbie. Got game-editor in the weekend. Managed to finally make a walking character.
i've done little bit game programming before in java so i know alittle bit about game progoraming.

So, I read in the manual that you can use diferent GED files in order to move to different levels. And in each GED you create a different level.

My question is, how do you set which GED is the first level.
and how within that first level...how do you code or how do you do it so that after you accomplish a certain thing, then you move into a different GED file(different level)
ggesterGamePro99
 
Posts: 44
Joined: Mon Apr 16, 2012 1:53 am
Score: 0 Give a positive score

Re: From Newbie: How to use Differnet GED for different Leve

Postby skydereign » Mon Apr 16, 2012 4:11 pm

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: From Newbie: How to use Differnet GED for different Leve

Postby ggesterGamePro99 » Mon Apr 16, 2012 4:15 pm

Aweeeesome.

I'm gonna do great games :)
ggesterGamePro99
 
Posts: 44
Joined: Mon Apr 16, 2012 1:53 am
Score: 0 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest