[SOLVED] load animation egg later

I know how to load an animation egg when creating an Actor, but I’m not sure how to load an animation egg later, assign it to Actor and play.

Use actor.loadAnims(anims) where anims is a dictionary in the same format as you would use when creating an actor.

this doesnot work:

animation = loader.loadModel('anim.egg')

actor = Actor("char")

actor.loadAnims({animation: "anim"})

No, but I bet this would:

actor.loadAnims({"anim" : animation})