All Questions

Community

D
JoepXIV

Why does the pause menu text not stay the same?

Hi, 

The code works beautifully here, but after going through the tutorial I expected the following bug:

- If you die, the pause menu says "You died." since we change pause_title.text to "You died", makes sense.

- Now you retry the game, and pause manually 

- Shouldn't the text still be "You died" since we never changed it back to "Paused"?


I guess part of the code must've changed it back somehow, but I miss it no matter how many times I go over. Would appreciate any insight :-)

  • Razoric replied

    When hitting retry, the scene is reloaded from scratch. It's more than just putting the player back to the start of the level and playing their respawn animation. The current version of the scene is unloaded and the new one reloaded - which includes the state of the paused menu as it is saved in the TSCN file, which is "Paused".