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

Unit Priorities: Explanation?

Status
Not open for further replies.
Level 5
Joined
Apr 20, 2008
Messages
150
I'm working on a survival-style map at the moment, and I found 2 problems- one on my spawn enemy side, and one on the side of one of the races, Humans.

On the Infected Side, I noticed that all units seem to auto-target the weakest spawn first, often allowing the tougher, stronger spawn to get close and cause havok. Unless we're with a player that's good with microing, there's a good chance that while his units are auto-attacking, they will kill the weaker spawn while the tougher spawns start beating on them harder

On the Human Side, there's a set of buildings I call 'Barriers' that block off enemy access. However, as the barriers are used, I notice 2 things:

1: The enemy will all converge on the same side as the side without the barriers, thus creating an unfair flow of all the infected to 1 side,

and 2: Upob blocking the area off and building towers on a hill in between the line of barriers, the enemy will ignore the walls and instead will attempt to attack the towers, leaving them stupidly standing on the edge of the cliff to get slaughtered (eventually, of course, the towers also follow the one problem I noted with the Infected notes)

I have a feeling that Unit Priority has to do with this, could anyone enlighten me about how this works? Or failing that, how I can fix this?
 
Level 5
Joined
Apr 20, 2008
Messages
150
I wasn't asking about unit level, I was asking about Unit Priority, a technically different subject alltogether.
 
Level 5
Joined
May 31, 2009
Messages
122
The highest priority is the unit type attacked first, the lowest one is the unit attacked last.

So you can set your "weaker" units to have lower priorities, and your "stronger" units to have higher priorities, and the stronger units will be attacked first.

However, I personally think (coming from a mapmaker perspective and not an individual trigger-maker), you should tweak the priorities, that the most annoying units (e.g. necromancers that can raise dead or something like that) have the highest priority; that way, computer controlled units will attack as if they were human controlled. Unless what you want to do is to do that on purpose, and say, make a giant melee tanking unit have higher priority so it naturally serves its purpose of soaking up damage first.

For that tower thing, you can lower its unit priority to a minimum. And you can also throw on a sight blocker in front of the tower, so the waves don't "see" the tower, and try to "attack" it (which is what they're doing when they stand like that). (If you want heroes to be able to attack the towers, don't put sight blockers)


For that first thing about the waves, you should be using region editor and a bunch of triggers. You should set out multiple region checkpoints (especially at chokepoints like that) that each specific wave will have to take, and that way you can make certain units go along certain paths, and prevent accumulation of units.

A trigger would be to first add all the units of a certain wave to a unit group, (right after your spawn trigger), then tell them to attack-move to the next region they need to go. Have a trigger for when the units of a wave enter the next region, they attack move to the region after that. You can add more regions, so they follow a more distinct path, and have a lower chance of trying to take another path (usually it ends up being the shorter route) because of that.
 
Status
Not open for further replies.
Top