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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  4. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  5. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    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.

Unit Priorities: Explanation?

Discussion in 'World Editor Help Zone' started by dragon_kid, Jan 1, 2010.

  1. dragon_kid

    dragon_kid

    Joined:
    Apr 20, 2008
    Messages:
    148
    Resources:
    0
    Resources:
    0
    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?
     
  2. LordDz

    LordDz

    Joined:
    May 11, 2007
    Messages:
    4,303
    Resources:
    0
    Resources:
    0
    The higher level of a unit the smarter it is? /drunk.
     
  3. dragon_kid

    dragon_kid

    Joined:
    Apr 20, 2008
    Messages:
    148
    Resources:
    0
    Resources:
    0
    I wasn't asking about unit level, I was asking about Unit Priority, a technically different subject alltogether.
     
  4. VestriDeus

    VestriDeus

    Joined:
    May 31, 2009
    Messages:
    120
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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.