Animations not always playing

Hi,

Just trying out defold.

I’ve created a collection which has the followings game objects: interface and sparkles.
I’ve created a flip-book animation for each one of them, and it’s set to loop forward.
I’ve also attached a script to each game object, and it would tell them via msg post to play the animation in the init method.

function init(self)
    msg.post("intro:/interface#glow","play_animation", {id=hash("anim")}) 
end

Now, the problem is sometimes it plays and sometimes it won’t. It doesn’t show any errors and I confirmed that the init function is called. What gives? I’m quite baffled.

Thanks in advance.

Weird. Are you sure you don’t have several sprites on the same position and same Z so the animated sprite is covered? Z ordering is non deterministic. Playing animations should definitely not be.

Ok,

So one of the sprites is a box (interface) and the animation is just a outer glow of that box. So, in my setup I put them in the same position. Should I alter the Z position as well ?

Can you post a screenshot of the setup?

Sure here you go…

The calls to init the animations are done in that introLogic go.

I also got that error in windows 10, but not on my mac. Not sure how to get rid of it.