Page 1 of 1

Can someone tell me how to change the level?

PostPosted: Sun Jul 15, 2007 9:05 am
by gamemaistro
Hey, eveybody. I'm 16 years old and a novice to GameEditor. I plan on making a game for my Computer Project this year, and I was wondering how to change the level. Keep in mind that I have an infinite 'land' Actor.

P.S If possible, give a method which does not involve complicated coding, or coding at all, since I have just started learning C++. :D

PostPosted: Sun Jul 15, 2007 9:52 am
by regine
Make the new level in a anew data, and load that data with LoadGame.

Example:

Add-> Collision -> Script Editor -> LoadGame("Level2.ged");

But when you Export the game you mustnt change the code to .dat or .exe.

PostPosted: Sun Jul 15, 2007 10:18 am
by gamemaistro
Thanks a lot! Really appreciated!

PostPosted: Sun Jul 15, 2007 11:37 am
by gamemaistro
Yes, it works!
But there's a small problem. I've also set a 'Play Music' Event when the level ends, and I want to wait till that music ends, and then want to change the level.
Plz help!

PostPosted: Sun Jul 15, 2007 11:46 am
by regine
Make that:

Make an Timer with the time of the music.

Add-> Collision -> Create Timer

Then make an new Actor called Load.
Now make an Timer Finish Event on the actor Load.

Add -> Timer -> Choose the Timer -> Script Editor -> LoadGame("Level2.ged");

And you have to delete the old LoadGame function.

PostPosted: Sun Jul 15, 2007 1:05 pm
by gamemaistro
It's not working. I did as you said and created a timer and an actor which loaded the next level when the timer ran out. But nothing's happening.

I've kept the time as 5000 ms. Should I keep it periodic or random? And should the loop run forever or for any specified number?

PostPosted: Sun Jul 15, 2007 2:17 pm
by regine
I think periodic and only one time.

What did you write, when you load the other level?

And have you deleted the old LoadGame event?

PostPosted: Sun Jul 15, 2007 6:45 pm
by Jay S.
Why don't you use a Conditional Action for this?

Here's what I mean: have it so when musicvol (music volume) reaches 0, load the next level.

1. Have musicvol decreased to 0 in some event. E.g., use a Draw Actor event for an actor and enter
Code: Select all
musicvol-=0.1;

(Change the number to how fast you want it to fade. A higher number means a faster fadeout.)

2. Next, on another Draw Actor event for an\the same actor, choose Conditional Action. For Expression 1, enter musicvol, then select the "Less or equal to" button, then in Expression 2 type 0.

3. Go to Script Editor and type:
Code: Select all
LoadGame(nameofyourlevel.ged);


I hope you understand, it can be quite confusing for anyone not used to it. :( (It was for me at one time...)

PostPosted: Wed Jul 18, 2007 5:24 pm
by gamemaistro
Yes, I got it!!!
But these problems don't let go of me. I have created a start-up menu, and the first level loads up when you hit Enter. It loads up fine, but all the Text Actors and Tile Actors just vanish!!!
Is there any solution top this? Text and Tile Actors are very important in my game, like the High Score or the name of the level.
Please Help!!

PostPosted: Wed Jul 18, 2007 5:53 pm
by regine
This is only in the game mode. When you export the game it will be OK.

PostPosted: Wed Jul 18, 2007 7:55 pm
by Jay S.
Yes, this is some sort of bug, or something like that. :( So, if possible, just ignore it and like regine said, it will be alright. :)

PostPosted: Thu Jul 19, 2007 1:59 am
by gamemaistro
Thanks a lot guys! :D