0 votes

I am starting my project out and have been doing well with a project until I needed to pause the sceneTree.

The game I am working on is an RPG with WarioWare style minigames.

My Issue

When I instanced one of them, I found that for whatever reason the Collisions of the Area2Ds were not being detected. The scene, when loaded separately works just fine though.

I found that if i remove get_tree().paused = true, it suddenly works just fine.

I have been receiving this error, which may have something to do with it after I pause the scene.:

the error

E 0:00:44:0374 Can't change this state while flushing queries. Use calldeferred() or setdeferred() to change monitoring state instead
servers/physics2d/physics2dserversw.cpp:737 @ bodysetshapedisabled()
basic enemy.gd:17 @ begin
battle()

asked May 23, 2019 in Engine by AfterCadaver (52 points)

Have you tried to set the pause mode of the areas to process? Does it change something?

Also, have you tried to set the pause mode deferred? As the error wants you?

I'll look into that first suggestion. Thank you.

How do I set the pause mode to defferred? I can't find that anywhere.

Haven't tried it but maybe get_tree().set_deffered(paused, false) could work.

Please log in or register to answer this question.

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.