I am using the template shooter_project script. My enemy has the aifps01 guard action attatched. He moves and attacks at the same time therefore only playing the attack animation giving a sliding effect. Also he continues to move when colliding with the player so even if the attack animation has a walk cylce in it to eliminate the sliding effect, he still walks while colliding with the player creating a moonwalk like effect.

How do I change the script so the enemy will attack, then walk then attack, walk, attack and so on untill he comes into a certain range of the player and then uses attack only untill the fight is over?

I don't know how to write code so if you know how to do this would you please post the code and tell me where I need to put it in the script.

thank you.

A.


A7.86 Pro/Artist
Alex's 3D