Tilemap Animation Not Pausing When Game Is Paused

Godot Version

4.2.stable

Question

As the title said, the built-in animation player on my tilemap node doesn’t pause when I pause the Scene Tree. The animation component of the tilemap doesn’t seem to be affected by the process mode at all, for instance if I set the process mode to disable, the animation will still play. Any idea why this is happening/how to fix it?

how do you pause the game?

i put get_tree().paused=true on input event function, it stop the animation player rotating a tilemap or others

Sorry, I incorrectly worded my question. I’m not using the Animation Player node, rather the animation feature in the tilemap node in itself.

you mean the animated tile?

also how do you pause?

I pause via get_tree().paused = true which is triggered through an autoload pause menu.

To awnser your other question, I do mean the animated tile feature. (As in I go to Tileset>“My Tilemap Name”>Select>Animation, and then configure the animation there.)

use Engine.time_scale=0.0 instead to pause

That just completely pauses the entire game, I can’t interact with the menu or anything because of the changed time scale. I checked online and it doesn’t seem like there’s any way to disable time scale alteration for specific nodes, so I think this solution is off the table for the time being.

Also it doesn’t deactivate the player, so they can still do like crouching animations and flip horizontally.

That just completely pauses the entire game, I can’t interact with the menu or anything because of the changed time scale. I checked online and it doesn’t seem like there’s any way to disable time scale alteration for specific nodes, so I think this solution is off the table for the time being.

You need to create a STATEMACHINE in the game to which you subordinate everything and have full control over everything. This is the best way to control events in the game, in the project, etc. The STATEMACHINE then listens to all the created entities you need.

Of course it depends on how conceptually you have designed your project. This is important. At an advanced stage of the project, it is quite difficult to apply STATEMACHINE.

STATEMACHINE talks about the state your game is in. IsGame, IsMainMenu, IsPaused etc.

And to that you subordinate everything you need to make it work in that mode.

Right, I understand that. I assume what you’re proposing is that I would pause the animation via code in the tile map script when the game paused state is on. Problem being that I can’t seem to find a way to pause the tile map animation via code or even in the editor.

And how exactly is the tilemap animation implemented? Your own script?

No, the built in tilemap animation feature for Godot 4.

Hm, I dont’t experienced with godot 4, I still work with 3.2.3 version.
But…
My realization was used Timer on the tilemat something like this:

and check timer a variable animate

func _process(_delta):
	if timer == true and animate:
		#animate tilemap 

and Animate variable you can controled when pause is done, for example…

maybe help this…