Pausing in my godot game is broken and I don't know how to fix it

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By
extends Popup

var notPaused = true
var paused = true

func _process(_delta):
    if Input.is_action_just_pressed("Pause"):
	    if notPaused:
		    get_tree().paused = true
		    visible = true
func _on_Resume_pressed():
     if paused:
         get_tree().paused = false
	     visible = false
func _on_Restart_pressed():

this should work as it did work before, but i can see the enemy moving in the idle state in the background.

Edit: I had the player, enemy and node2D nodes on process, when they should’ve been on inherit, its working fine now.

1 Like
:bust_in_silhouette: Reply From: rahsut

In the popup node, (or if the popup node is a child of another node, go to the parent’s node), go to the pause part of the node and change it from ‘Inherit’ to ‘Process’. That’s what I did to fix it when it happened to me. If it didn’t fix it, could you send a video of what is going on? It would help me better understand the problem (just upload it as a video on YouTube.)

it was on process :frowning: | 2020-08-17 14:43

Oh. Do you think you could send me a video of the problem? Just upload it to YouTube and send a link.

rahsut | 2020-08-17 20:59

1 Like