- Home /
Question by
orenspiralgalaxy · Feb 07, 2012 at 11:59 PM ·
enemyenemyaienemydamage
Enemy move to target, upon reaching target, stop moving and perform attack animation
I'd like to achieve an enemy unit moving towards a target game object that isn't moving. Once reaching the target object, the enemy stops moving, and stops it's moving animation as well, as well as starting it's attack animation.
When I can achieve this, my second step is to make the target game object have a certain amount of health, and each time the enemy attacks it, 1 health is removed from the target's total.
Can anyone guide me in the right direction? A direction that doesn't involve me trying to dissect a much larger script that does all kinds of things I don't want? This would be much appreciated!
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613063842im_/https://answers.unity.com/themes/thub/images/avi.jpg)