I hope AnimatedSprite2D can set FPX and loop playback for all animation checklists at once.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 南狸先生

I hope AnimatedSprite2D can set FPS and loop playback for all animation checklists at once.

Sorry if it was a mistranslation, but what do you mean by FPX? I couldn’t find it anywhere in the docs or online. If I could write in Chinese I’d help you.

Blockmaster27 | 2023-01-17 07:29

oh,sorry.My mistake. it is FPS.

南狸先生 | 2023-01-17 09:50

:bust_in_silhouette: Reply From: Blockmaster27

Hey buddy, I got part of your answer:

Change FPS:


This should change the FPS of the desired AnimatedSprite2D. You can loop through an array (list) of AnimatedSprite2D nodes like this:

func _ready():

    var arrayOfSprites = []
    var FPS : float = 60
    var sprite : AnimatedSprite2D = get_node("ENTER PATH HERE")
    for sprite in arrayOfSprites

Add more lines of arrayOfSprites.append(sprite) for each one you want to edit. Or just add these to the arrayOfSprites variable. Change ‘60’ to the desired FPS.

For loop playback, I do not know. I can’t find a built-in function for this. I’m sorry and I hope you can figure this out. Surely there is a way to edit the looping with code.