ForumsProgramming ForumAdd more levels to a game

7 3095
deserteddreams
offline
deserteddreams
20 posts
Nomad

Okay well im working on a game.
I got a movie clip called game.
Which is the whole level...
and i want to add extra levels but i dont exactly know how to do that.
on the main timeline i only have 1 frame which the game mc.
So, if i could get any help. it would be much apreciated
+ i also need help with boundarys. since they dont want to work. (to prevent the main character from going over the edge)

  • 7 Replies
GeraldGefter
offline
GeraldGefter
24 posts
Nomad

just make another MC with empty first frame and in second create your extra level.Do not forget to stop action in main level while you are in extra level.
you should write those boundarys that don't want to work )

deserteddreams
offline
deserteddreams
20 posts
Nomad

i fixed the boundarys. to some degree... But when i made a new level. it didnt like go thru the examine level function again?

GeraldGefter
offline
GeraldGefter
24 posts
Nomad

I didn't quite get what's the problem is
is it about making main function for loading unloading levels?

Katumi
offline
Katumi
9 posts
Nomad

You could add a 2nd keyframe to your game movieclip, where you draw level 2

So when you reach the end of level 1 you can tell the game movieclip to go to frame 2.

game.AddEventListener(Event.ENTER_FREAME, changeWorld)
function changeWorld (event:Event)void;
{
game.gotoAndStop("2"
}

Katumi
offline
Katumi
9 posts
Nomad

uhm, after taking a 2nd look i noticed a few typos in my code, sorry.

game.addEventListener(Event.ENTER_FRAME, changeWorld);
function changeWorld (event:Event)void;
{
if (player reaches the goal of level 1)
{
game.gotoAndStop("2"
}
}

deserteddreams
offline
deserteddreams
20 posts
Nomad

Yeah i did that to my game before. But it still doesnt work. Like, It loads up the game and everything fine. But it doesnt re-examine the level. and if i delete objects from the first frame, they dont appear on my second frame.
If anyone wants to help me make my game. (you will be credited)
Please message me with your email address. And i will contact you asap with what i need help with. Thank you.

GeraldGefter
offline
GeraldGefter
24 posts
Nomad

deleted objects don't appear then you're re-using main loadlevel function?
there must be a mistake in code or you just've got wrong create obj function...
ICQ 356642105 (no email sorry)
By the way the code below won't work if you want deleted objects reappear
instead of gotoAndStop write your main load func for level one just change level name
function should make the same objects but for the second lev
maybe I'm wrong...

Showing 1-7 of 7