Advance to next level button in pause screen
Hi all,
I am having a real headache trying to get round this problem, so I hope you can help.
In my game I'm using the pause function to bring up an end of level screen. On the screen I have a "continue" button which will take players to the next level (without going back to the menu). The problem I have is I want the "continue button" to send players to the next level in the sequence (ie Current Level is 5, go to Level 6).
As the pause scene is separated from the actual level, I dont know how to tell the button to "go to next level" without making loads and loads of ending screens (1 for each level!). I have tried "change scene, next scene" but that doesn't work.
Hopefully that makes sense, any help is welcomed.
I do hope to one day help others on here, and not just ask questions!!
I am having a real headache trying to get round this problem, so I hope you can help.
In my game I'm using the pause function to bring up an end of level screen. On the screen I have a "continue" button which will take players to the next level (without going back to the menu). The problem I have is I want the "continue button" to send players to the next level in the sequence (ie Current Level is 5, go to Level 6).
As the pause scene is separated from the actual level, I dont know how to tell the button to "go to next level" without making loads and loads of ending screens (1 for each level!). I have tried "change scene, next scene" but that doesn't work.
Hopefully that makes sense, any help is welcomed.
I do hope to one day help others on here, and not just ask questions!!
Comments
1. Create a game attribute "goToNextLevel" (boolean)
2. On your "Continue" button in your pause scene, make the on-touch do two things 1) change attribute "goToNextLevel" to true, and 2) unpause scene
3. In one of your actors that's in your scene (like a controller actor that's in every scene, or a background actor that's in every scene) add a rule:
When attribute game.goToNextLevel = true
- Change attribute game.goToNextLevel = false
- Change scene -> next scene
Dave