Multiple gotoAndPlay considered really harmful
Shortly after I wrote a blog post about how decentralized gotoAndPlay calls can mess up your game states, I ran into a situation where calling gotoAndPlay on the same clip multiple times is causing real harm! Basically, I have a hit animation on an enemy movieclip that gets played whenever the enemy is hit. For enemies that can take multiple hits before they are destroyed, they sometimes would run into a "stuck" state where the animation isn't playing anymore. Finally, I had to fix it by making sure that the hit state animation can only be played when it's done playing. This has not been the case for many other game projects I have done, so I am not sure exactly what combination of things are causing this behavior.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home