• 🏆 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!

[Trigger] Aim Someone

Status
Not open for further replies.
Level 25
Joined
Sep 26, 2009
Messages
2,378
IIRC, priority has nothing to do with unit's preference to who it attacks, but where that unit-type is in your interface when you more unit-types.
(e.g. in group selection, hero is always selected as first and has the first position, etc.)
 
Level 12
Joined
Nov 3, 2013
Messages
989
Im guessing you would check if the way to the runner is still blocked after destroying the building and issuing target order attack unit (the runner)
 
IIRC, priority has nothing to do with unit's preference to who it attacks, but where that unit-type is in your interface when you more unit-types.
(e.g. in group selection, hero is always selected as first and has the first position, etc.)

Taken from here:

Stats - Priority (Integer)
Defines at what point the unit/building/hero will be attacked when within a group of units/buildings/heroes being attacked. The values entered can range from 0 to 20, with 0 meaning that the unit/building/hero will be attacked last, and 20 meaning that it will be attacked first.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
Taken from here:

Stats - Priority (Integer)
Defines at what point the unit/building/hero will be attacked when within a group of units/buildings/heroes being attacked. The values entered can range from 0 to 20, with 0 meaning that the unit/building/hero will be attacked last, and 20 meaning that it will be attacked first.

now go and run my test map a few times
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Melee units will also prefer to attack nearby targets rather than using a priority on certain targets. This is because they must walk to the target which can be considered lost DPS. Range units will generally be more picky with their targets as they will often have many to choose from.

I believe health may also factor in at times but that may only be for AI controlled units.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
yes, and if you check my map the script ensures that the unit created is exactly the same distance from both units, they both have full hp as well.

But yes if you add fortified armor to the buildings it should drop their priority for targeting, at least for normal AI
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Units with attacks have higher priority than units without. Specifically when attacking.

A common problem is melee units ignoring walls and so being stuck in permanent moving trying to get to attacking units even though the path is blocked by a wall. The solution in this case was to give the walls 1-1 dummy attacks just to raise their priority from passive buildings (farm, blacksmith etc) to tower (Guard Tower etc).
 
Status
Not open for further replies.
Top