1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Priority

Discussion in 'World Editor Help Zone' started by JackAcorda, Aug 6, 2018.

  1. JackAcorda

    JackAcorda

    Joined:
    May 23, 2018
    Messages:
    13
    Resources:
    0
    Resources:
    0
    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?
     
  2. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,451
    Resources:
    1
    Spells:
    1
    Resources:
    1
    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".
     
  3. Death Adder

    Death Adder

    Joined:
    Nov 3, 2013
    Messages:
    886
    Resources:
    0
    Resources:
    0
    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.
     
  4. JackAcorda

    JackAcorda

    Joined:
    May 23, 2018
    Messages:
    13
    Resources:
    0
    Resources:
    0
    So I guess I should rely on triggers :pmeh:
    Any suggestions on how to do it? :pgrin:
     
  5. Death Adder

    Death Adder

    Joined:
    Nov 3, 2013
    Messages:
    886
    Resources:
    0
    Resources:
    0
    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.
     
  6. Kaijyuu

    Kaijyuu

    Joined:
    Jun 2, 2004
    Messages:
    848
    Resources:
    0
    Resources:
    0
    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.