Hello,
How do I create a counter for the remaining tries the player has? After the player dies, the “try again” screen is presented. Once the game starts again, I want the “tries” count and icon to be decreased by 1. When there are no tries left, I want the “game over” scene to play.
So far I only have the “try again” scene activated when the player dies but I don’t know how to proceed from here. Thanks!
(Live/s refer to Tries)
Hey, You’ll want to change the scene variable to a global variable instead and add a “trigger once” to both events.
For adding a game over screen, create a new event, click add condition and search for value of global variable and add trigger once, then click on add action change to scene “gameover” or whatever your game over scene is called.
Okay, so I did what you said. The global variable is set to 2 but when the scene begins it is already set to 0. So I added the LivesLeft >= 1 but that didn’t do anything. I made the second row a sub-event to the first, which didn’t work either.
It’s being set to 0 because you haven’t changed the variable type in the text, also you’ll probably want the event that subtracts to have PlayerFight is dead condition instead.