- Home /
animation on multiple objects
Hi, I'm coding a side scrolling game. The enemies have a patrol animation on them. this is currently the same animation on each. Is it possible to stop the animation (using animation.Stop("enemyPatrol") so that it only stops the animation on the one enemy that the player has come within a certain distance of? Or will I need to make a separate animation for each of the enemies?
If you call the animation.Stop on a single enemy, it will only stop that enemy. There is no easy way to globally change animations the way you are talking about here!
Answer by LionTR · Sep 23, 2011 at 08:55 AM
If the enemies are separate GameObjects with separate animation components, you should be able to stop the animation on only one. animation.Stop() is enough.
Your answer
Follow this Question
Related Questions
Playing Animation When Two Keys Are Held Down To Play Run Animations 0 Answers
Using the same animation on duplicate objects. 2 Answers
Walking Animation 1 Answer
Enemy Patrol - Random Walk 1 Answer