Topic was automatically imported from the old Question2Answer platform.
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.
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")
arrayOfSprites.append(sprite)
for sprite in arrayOfSprites
sprite.set_speed_scale(FPS)
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.