Unit attack AI

M

MrMadMan

Guest
I'm having problems making my ai work as i want it to.

I'm making a map with hunters and animals and wants some animals to attack hunters on sight or when they are attacked.

I want the animal to keep attacking if the hunter attacks back, but if the hunter doesn't attack back (flees) the animal should stop attacking/chasing him after a while.

My problem is that if i make a trigger that waits and then stops the animal it will stop EVEN IF it was recently attacked.

I hope anyone can help me with this...
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
You can set the camp range to something smaller.

When a creep camps, it will follow only until a certain point (the one you change), and then go back if its target is out of it's base range. Something close to that.

I think you can do it in the Object Editor (if not, Gameplay Constants), and also they might have to be neutral hostile.
 
M

MrMadMan

Guest
That's a pretty good idea but:
1. My Animals are neutral passive
2. It probably wont work if they are given the "order" attack right?
3. Doesnt't camp range mean it will return to its "camp" when it's stopped attacking?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top