• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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 ?
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
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
 
Level 9
Joined
May 21, 2014
Messages
580
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.
 

sentrywiz

S

sentrywiz

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.
 
Level 3
Joined
May 12, 2012
Messages
41
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.
Top