• 2D
  • Multiple animated sprites with the same animation

Hello,In my Scene I added a node and 2 children:- Sprite- AnimationPlayer (and I added 1 animation)Sprite object has also a script attached:[code]extends Spritefunc _ready(): get_parent().get_node("AnimationPlayer").play("rotate") var anim = get_parent().get_node("AnimationPlayer").get_animation("rotate") anim.set_loop(true)[/code]And after that I duplicated (Ctrl+d) the Sprite and move it to other location in 2D space of the Scene, but this one is static.Is this a bug? Shouldn't the second sprite use the "rotate" animation as well since it uses the same script and it is duplicated from the animated one?

Make it a Scene and save. Then, instance this scene and you can duplicate. simple..

[quote author=gtkampos link=topic=15566.msg16505#msg16505 date=1464713082]Make it a Scene and save. Then, instance this scene and you can duplicate. simple..[/quote]Yas, it works this way. Thanks a lot!