How to create a skip button in a pause scene?

famekraftsfamekrafts Member, BASIC Posts: 834
When the player presses pause button it pauses game and pause scene is on. I did this so I do not have to create the menu button level button etc separately for each stage but now I wish to create a skip button.

The problem is if it was in each level it was easy go to next scene, but now as its in pause scene, I have to find out first which stage is the game in and then go to next scene.

The basic idea is that if it's stage 1 it will go to stage 2 and so on.

Will something like this work.

Make s self attribute skip stage in the skip button.

When it' goes to pause scene, make self. Skip stage = game. Stage

When it's touched

Make skip touch = skip touch + 1

Go to to scene value skip touch.

How to make the the last part, is there a way to add a go to scene value?

Comments

  • Define a boolean Game Attribute, and use it as trigger for change the scene.
    For example:
    Set a Rule in some actor (that must be present in all scenes) which condition is the true value of that boolean, and inside the rule set the change scene behaviour and Go to Scene: Next Scene.

    Now, when your skip button is pressed, just set that boolean to true, and Unpause the game, so the actor containing the Rule will change game to the next scene immediately.

    Don't forget to set back to false the boolean just before the Change Scene behaviour
    :)
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Just keep track of which scenes are completed with an index attribute and make rules that go to the next scene based on the scene count in the index attribute.
  • Yes, that is another useful way to do it, but only if you have not too much scenes
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    It would work for hundreds of scenes as you need to address change scene each with a change scene behavior as that behavior is a drop down menu not an attribute.
  • Mantiz_DevelopersMantiz_Developers PRO Posts: 34
    edited November 2012
    yes of course but just imagine doing hundreds of rules for hundreds of scenes, i don't think that is very practical
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yep and that is why changing a scene from the pause menu isn't ideal
  • not ideal but there's explained how it could be done ;)
  • famekraftsfamekrafts Member, BASIC Posts: 834
    I realised it a bit late but the problem is if I use pause behaviour everything becomes unclickable in scene. So how will the buttons work if I use pause, and if not then how do I pause the game while making the buttons clickable?. Right now my 60 levels are ready so cannot change now but will keep in mind for next games.
  • famekraftsfamekrafts Member, BASIC Posts: 834
    Define a boolean Game Attribute, and use it as trigger for change the scene.
    For example:
    Set a Rule in some actor (that must be present in all scenes) which condition is the true value of that boolean, and inside the rule set the change scene behaviour and Go to Scene: Next Scene.

    Now, when your skip button is pressed, just set that boolean to true, and Unpause the game, so the actor containing the Rule will change game to the next scene immediately.

    Don't forget to set back to false the boolean just before the Change Scene behaviour
    :)
    I think this will work thanks.
  • richiconrichicon Member, PRO Posts: 55
    @Mantiz - very elegant solution; I am trying to do the same thing now and your post is a BIG help. Cheers :)
Sign In or Register to comment.