Do I need 1 end of level screen for every level?
micksolo
Member Posts: 264
Hi, Think of angry birds. At the end of every level you go to a level ranking screen showing
1. your ranking
2. retry button
3. next level button (if you passed the level)
4. back to main menu button.
I'm basically doing this in my game, first time around I just duplicated the end of level (EOL) screen for every level, so the level progression looked like this
1 -> EOL 1 -> 2 -> EOL 2 -> 3 -> EOL 3 and so forth.
However for whatever reason I just want to have one EOL screen which updates the latest score from that level. I've made everything work so it resets scores, saves scores to the right levels, but there is no way to tell GS to go the next scene. I have an integer attribute called gameLevel and basically want I want to do is have a rule that says
If button "next level" is pressed go to level (current level +1)
and that would sort my problems, but there is no way to do that I think. Any suggestions? Or do I need to go back to my old system of having one EOL screen for every level?
Thanks
1. your ranking
2. retry button
3. next level button (if you passed the level)
4. back to main menu button.
I'm basically doing this in my game, first time around I just duplicated the end of level (EOL) screen for every level, so the level progression looked like this
1 -> EOL 1 -> 2 -> EOL 2 -> 3 -> EOL 3 and so forth.
However for whatever reason I just want to have one EOL screen which updates the latest score from that level. I've made everything work so it resets scores, saves scores to the right levels, but there is no way to tell GS to go the next scene. I have an integer attribute called gameLevel and basically want I want to do is have a rule that says
If button "next level" is pressed go to level (current level +1)
and that would sort my problems, but there is no way to do that I think. Any suggestions? Or do I need to go back to my old system of having one EOL screen for every level?
Thanks
Comments
Example:
Create a game attribute called currentlevel
When a current level is completed, then change the currentlevel game attribute to the level number that you have just completed, and then change the scene to the "End Level".
Then on the End Screen scene, add to some actor the following rules...
Example:
When actor receives event touch pressed{
when attribute game.currentlevel=1{
change scene to level 1
}
when attribute game.currentlevel=2{
change scene to level 2
}
}
This way.... I think you will understand well...
Another easier way, that I use on my games (Save Cubes and Save Cubes HD, is when the user completes the level, then I spawn another actor saying, Level Completed, tag to go to next... This is easier... If you prefer you can spawn an actor that is the full size of the screen.
If you have any doubt about this, download my game Save Cubes, for iPhone from the App Store, to see how it works... Its free. And please, rate it....
Press "actor.next" go to "current.level" + 1
Anyway, it worked well, thanks a lot.