Do I need 1 end of level screen for every level?

micksolomicksolo Member Posts: 264
edited November -1 in Working with GS (Mac)
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

Comments

  • DimensionGamesDimensionGames PRO Posts: 993
    I didn't really understand what you meant but use the change scene attribute?
  • scrapee_netscrapee_net Member Posts: 424
    I think you dont need to duplicate the end level scenes, Just one is enough. All the you have to do, is when a level is completed, before changing the scene to the "End Level", save all the data that you need to show on the end level scene, as game attributes.

    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....
  • micksolomicksolo Member Posts: 264
    Thanks Sabat, that worked really well. I wish I could just say

    Press "actor.next" go to "current.level" + 1

    Anyway, it worked well, thanks a lot.
Sign In or Register to comment.