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

Priority

Status
Not open for further replies.
Level 2
Joined
May 23, 2018
Messages
13
I have set my each of my unit's priority as follows:
Archer = 15
Soldier = 15
Hero = 5

However, the archer and soldier is attacking the hero first even if the hero is late to enter the battlefield.
Am I doing something wrong? Should the priority of the Hero be higher than the others so that the hero will be the last one to be attacked?
 
Level 39
Joined
Feb 27, 2007
Messages
5,013
I think unit AI in wc3 just does that because the unit is a hero. Perhaps there's a gameplay constants/map setting that tells the AI to treat heroes differently or the same?

Edit: On second thought you should try flipping the numbers. It makes way more sense for 1 to be "highest priority" than "lowest priority".
 
Level 12
Joined
Nov 3, 2013
Messages
989
I'm still not entirely sure if priority affects targeting or not (I think it does nothing), but one thing it does is change the order in which the units are shown while selected by the player.

So generally you want heroes & caster units to have higher/lower (don't remember which) so they're the leftmost units in the selection group, making it easier to cast spells etc.
 
Level 2
Joined
May 23, 2018
Messages
13
I'm still not entirely sure if priority affects targeting or not (I think it does nothing), but one thing it does is change the order in which the units are shown while selected by the player.

So I guess I should rely on triggers :pmeh:
Any suggestions on how to do it? :pgrin:
 
Level 12
Joined
Nov 3, 2013
Messages
989
Well, this probably have something to do with the default computer AI in wc3, maybe it can be changed somehow with a custom AI, but first of all try to just make the computer player into a "user" or "unused slot" 'player' instead of computer AI. That should make it so that the units attack whatever they see first without changing targets.
 
Level 11
Joined
Jun 2, 2004
Messages
849
One thing that does affect targeting is armor type. It's hardcoded to attack fortified armor last. I used this in one of my maps to make ranged units targeted last (to make melee more effective tanks).

I didn't thoroughly test all the armor types but I imagine hero armor will have a high priority, since it's typically a good idea in melee to focus fire heroes.
 
Status
Not open for further replies.
Top