• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Aim Someone

Status
Not open for further replies.
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,259
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,259
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