[AI] Strange behavior

Status
Not open for further replies.
Level 6
Joined
Oct 31, 2014
Messages
170
I have two units. A hero and a regular unit (some kind of pet)
Even if both of my units have the same priority value (9), the creeps will always attack the pet instead of the hero, even folowing it for a long distance instead of attacking the hero. Does anyone have an explanation?

Also I would like to make the creep packs return to their position after folowing for a specific distance (like 1000), is there any way to set this in the map constants or do I have to trigger each God Damn pack ?
 
For the first one:
There is some way to do it but I cannot remember what it is. I think priority value actually determines which unit will be listed first when you drag select multiple units

For the second one:
You should be able to set it in gameplay constants
I believe it is called Creeps - Guard Distance or Creeps - Guard Return Distance
 
I have two units. A hero and a regular unit (some kind of pet)
Even if both of my units have the same priority value (9), the creeps will always attack the pet instead of the hero, even folowing it for a long distance instead of attacking the hero. Does anyone have an explanation?

I would like to also know what can cause this.

I have one theory that it's because the unit is classified as a worker. I'm not sure though.
FOr me though, the unit always being attacked has a 1 priority, everything else has 3. The AI will still always attack the "pet" unit.
 
Edit the three values under Creeps:

Guard Distance, Guard Return Distance and Guard Return Time.

Put Guard Return Time to something like 1 second or so and they will always stop chasing after a short while. I know because I've done this for my maps.

About the other thing you can trigger it by swapping orders or when unit attacks unit, check whether there is a hero nearby and order the unit to attack the hero instead.
 
what about the basic unit level...?
basic human footmen are stage 2 afaik, the tallest rock golems stage 9, maybe there...?
 
Status
Not open for further replies.
Back
Top