Godot 4.3
func _on_player_health_depleted():
%GameOver.visible = true
get_tree().paused = true
func _input(event):
if event is InputEventKey and event.pressed:
if event.keycode == KEY_ESCAPE:
%Pausescreen.visible = true
get_tree().paused = true
func _input(event):
if event is InputEventKey and event.pressed:
if event.keycode == KEY_E:
%Pausescreen.visible = false
get_tree().paused = false
I am trying to make a pause screen for my game and I can pause it and it works fine but I tried to make it that when I press E it unpauses but I can’t figure it out I tried adding like _input_2
but it didn’t work, but if I have _input_2
in the code the game runs perfectly fine but it just won’t unpause the game. Also I’m new to godot not sure if that’s important.