0 votes
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.

in Engine by (298 points)
edited by

1 Answer

0 votes
Best answer

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.)

by (192 points)
selected by

it was on process :(

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

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.