How do I create a reset screen.
I'm working on an "infinite runner" and was wondering how to make a screen appear after you die to reset the scene. The way I've tried doing it was having actors spawn when you die for a background and reset button, however I can't control we're they appear in relation to the camera. I've also tried making separate scenes for them but that would take a lot of scenes.
Once I've got the screen working, I'm also curious about how to make a random text box appear displaying one of several messages based on how you die (for example, about 10 phrases related to lava based death for when you fall in lava) and have no idea how to go about it.
Any suggestions?
Best Answer
-
tatiang Posts: 11,949
Yep, sorry, I meant that you should reset the scene after it's unpaused. So have the pause scene change a game attribute (e.g. boolean) and then have the gameplay scene reset when that attribute changes value.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
Use the Pause Game behavior. It allows you to display a separate scene on top of the current scene.
There are many tutorial videos available that cover pausing a scene and also that cover choosing a random value from a table. I would start with Google searches along the lines of gamesalad pause game and gamesalad choose random value.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I've tried using Pause Game, but once I hit the reset button it wont unpause and reset at the same time.
I don't know exactly how your gameplay scene is set up, but generally speaking you would have a button (actor) on the pause scene that does a Reset Scene behavior (or Change Scene if you want to go back to the menu scene, for example). So you're not using the Unpause Game behavior at all.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Spawn your actors on the hud layer for the reset.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Oh interesting, I didn't realize that using a reset scene behavior in the pause screen would reset the the scene that's it's paused on top of. I mean that's what you'd want I think, I just didn't realize it. I thought this whole time you had to have the pause scene do a change scene back to your game if you wanted to reset it instead of just unpause it. I'll look into using that in a game I'm working on. Feels like I would be easier than having a separate rules inside every actor when there's a gameover.
Vote for Nearest Neighbor Scaling option in gamesalad! Let's make our games look truly stunning!
Easy. Have change scene behavior invoked, preferably using a timer.
Example:
1. Have a Splash Scene in which upon pressing play you set the default values for the game and then Change Scene to Game Scene.
2. In the Game Scene, upon character death, spawn a Game Over actor or Display Text "Game Over"
3. Use a timer so that after 3 seconds, you change scenes back to the splash scene.
My Blog / App Store / Google Play
I've tried that, but the Reset Scene only effects the current scene (in this case the pause menu) so it resets the pause menu and doesn't go back to the scene were you died (as I mentioned above I've considered using a separate reset scene for each level with the Change Scene button)
I don't think you understand my above description. I don't want a splash screen, I want a screen that changes after pressing a button, and I can spawn the "Game Over" text, I just want to be randomized (for example it could say "You died." or "Ouch" or "Don't touch the spikes"), the only example I can really think of is the Minecraft launch screen.
Thanks that seems to work.