Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug if back main menu and click button play #42

Open
rifkytecoder opened this issue Nov 5, 2021 · 1 comment
Open

Bug if back main menu and click button play #42

rifkytecoder opened this issue Nov 5, 2021 · 1 comment

Comments

@rifkytecoder
Copy link

func _unhandled_input(event: InputEvent) -> void:
if event.is_action_pressed("pause") and pause_title.text != DIED_MESSAGE:
self.paused = not paused
scene_tree.set_input_as_handled()

@mavjs
Copy link

mavjs commented Jan 9, 2022

Finished this tutorial a few days back, and ran into a similar issue. I noticed that someone commented on the YouTube video on how to fix it and it worked for me, so I'll reference it here as well, in case, someone comes here first to look for answers.

Commented by Краси Кирчев on YouTube

I had some issues with dying and the game being paused after that.

The dying sets self.paused = true. The retry button has code that turns pause off, but if you go to Main Menu, buttons aren't clickable.
To fix this, you need to open the MainScreen.tscn (and the EndScreen.tscn) and make them process when paused just like we did for the UserInterface.
Issue doesn't stop here - game is still paused, and if you click Play on the MainScreen, you start lvl1 but frozen mid-air.
To fix this, you need to add "get_tree().paused = false" or similar to the Play button's on-pressed function, just like we did in the Reply button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants