what is the code that i can use that allows people to go to a level after beating the one they are on? also, is there a code that i can use for when they press “Start Game” that allows them to go to the level select page? Thanks in advance!!! [import]uid: 19836 topic_id: 6148 reply_id: 306148[/import]
define “level” ? [import]uid: 6645 topic_id: 6148 reply_id: 21063[/import]
Like say they are on level 1 but then they beat it. So how do I make it so they advance to level 2? [import]uid: 19836 topic_id: 6148 reply_id: 21065[/import]
well level 2 could be something as simple as saying
[lua]ASTEROID_SPEED = ASTEROID_SPEED + 10[/lua]
asteroids get faster, game gets harder.
you need to explain what your “level” consists of
[import]uid: 6645 topic_id: 6148 reply_id: 21068[/import]
Well I’m making a maze, but what I’m trying to say is like transition from level 1 to level 2. Like, they press a button, and it takes them to level 2. A pop up box type of thing. [import]uid: 19836 topic_id: 6148 reply_id: 21074[/import]
Well I’m making a maze, but what I’m trying to say is like transition from level 1 to level 2. Like, they press a button, and it takes them to level 2. A pop up box type of thing. [import]uid: 19836 topic_id: 6148 reply_id: 21075[/import]
Use the Director Class downloadable from the Code Exchange.
Also look at the Ghosts vs Monsters sample game, so you see, how it works. [import]uid: 6587 topic_id: 6148 reply_id: 21107[/import]
look at the director class in the code exchange for easy screen management
you would define each level as it’s own file eg level1.lua, level2.lua, level3.lua
then you might instantiate a popup from another module eg popupmenu.lua before calling the director to go to the next level
[import]uid: 6645 topic_id: 6148 reply_id: 21109[/import]
okay. sorry guys im new to app development, so where can i get the code exchange? [import]uid: 19836 topic_id: 6148 reply_id: 21242[/import]