infinity animation

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By maritov

it is possible silly question but i’m myself not understand: how to do infinity animation somebody or something. (i am wanna do infinity animation bonfire)

i am tried do infinity cycle but it’s not worked:

‘while true:
do infinity animation’

or

‘while 1 > 0:
do infinity animation’

:bust_in_silhouette: Reply From: magicalogic

You just have to replay the animation every time it finishes.

func _ready():
    animation_player.connect("animation_finished", self, "_animation_finished")

func _animation_finished(animation_name):
        animation_player.play(animation_name)