going to the next level

a7medo778a7medo778 Member, PRO Posts: 119
edited November -1 in Working with GS (Mac)
guys this is really really killing me here
so the level is done
i call pause behavior and switch to scene with black background ( for example ) now how can i spawn a button lets say called next level to indicate the next scene from my original scene

if i spawned it with the pause behavior it becoms unclickable because it appears behind the pause scene
if i called it with ( attached ) to the pause scene it will take me to the next scene of the pause scene not the original level

so how can i do this ?

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Are you just trying to change scenes because a level has been completed, or Is the pause behavior necessary because you are pausing the game?
  • a7medo778a7medo778 Member, PRO Posts: 119
    no i am trying to display the " level completed message " while the game is paused in the back

    and offer the main menu and next level options ofcourse
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    You wont need the pause behavior for this. You just change scenes when level is completed, and have a stagnant image that informs the player the level is completed, display score, etc...and words that say "Next Level" "Repeat Level" or "Main menu". The you use invisible actors over those words that have rules that when touched, it takes them to whatever scene you set it to.
  • a7medo778a7medo778 Member, PRO Posts: 119
    but how can i freeze the game in the back ? and timers...etc ?
  • floydianspiralfloydianspiral Member, PRO Posts: 308
    I suggest: use the Pause feature to freeze everything in the back. Each level should have a unique ID number in some hidden rule somewhere. Then on your pause menu "go to next level" you can have a chain of logic that says if current.level = x then go to x+1.
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    If the level is over, you shouldn't need to freeze anything. Once you change scenes, that previous activity is over, and the current scene is the only action going on. As far as timers, you set up attributes and use "save attribute" to keep the timer data, and "load attribute" for the next level with action to play it again.

    There is a demo that shows how to pause time. Search in the GameSalad Creator under the "New" section when it starts up for "Pause Time Demo" it shows you how without using the actual pause behavior.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You cannot change scenes from inside a pause
  • a7medo778a7medo778 Member, PRO Posts: 119
    mmmm i see where your going
    but bare with me a little so i can get this right

    if i am going to change the scene to a static scene with the image... and use the behaviors to change to next scene or x scene

    assuming i have 75 levels
    in this case i am going to need 75 win scenes so each of them direct to the correct win scene

    ( i didnt under stand what stagnant which might created the miss understandig of your idea )
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    if you just place all of your scenes in the correct order then when you display a win scene actor you are setup as when touch is pressed change scene to next scene. You don't need a different actor for each scene
  • floydianspiralfloydianspiral Member, PRO Posts: 308
    a7medo, if you store a unique ID in each level you only have to have one win scene. Ex: Level 1 has a rule actor with self.mycurrentLevel = 1, constrain mycurrentlevel to a global CurrentLevel then if player wins you have an actor that says, if CurrentLevel = 1 > change image/text/etc. If CurrentLevel = 2, a different text/image.

    This way all you have to do is edit the instance of the rule actor on every level so that each self.mycurrentlevel increments properly
  • mangaroomangaroo Member Posts: 419
    @floydianspiral thanks, that sounds like a solid tip *printscreened* for future :P
  • a7medo778a7medo778 Member, PRO Posts: 119
    thanks alot guys
    gonna try abd get back to you
Sign In or Register to comment.