HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Attack Priority?

07-31-2006, 04:22 PM#1
Sardius
Just wondering how you can change the attack priority of a unit, so the computer or auto attacks will see one unit as a greater threat then another... I thought the stat "Priority" in the Object Editor would do exactly that, but it doesn't seem to effect this at all, because despite my familiars having a priority of "1" They are frequently targetted when many other higher priority targets are right next to them.
07-31-2006, 04:26 PM#2
StockBreak
Quote:
Originally Posted by Sardius
Just wondering how you can change the attack priority of a unit, so the computer or auto attacks will see one unit as a greater threat then another... I thought the stat "Priority" in the Object Editor would do exactly that, but it doesn't seem to effect this at all, because despite my familiars having a priority of "1" They are frequently targetted when many other higher priority targets are right next to them.
I think that the priority you're talking about it's hardcoded. The unit field "Priority" only edits the position of the unit when creating groups (Ctrl+1 etc...).
07-31-2006, 04:28 PM#3
King Klear
Perhaps unit level could do something...
07-31-2006, 05:05 PM#4
SFilip
or classification...as far as i know buildings/workers only get attacked if there are no other units nearby.
07-31-2006, 05:39 PM#5
Sardius
Hm, so classification and possibly level then? Though giving them certain classifications tends to have unusual side effects.
07-31-2006, 05:41 PM#6
SFilip
indeed. mind telling us what are you trying to do?
07-31-2006, 05:55 PM#7
Sardius
Trying to make my familiars a low priority for attacking is all, so they are generally ignored unless their are no other targets around... The hero is always close to the familiar at any rate, but the computer seems to enjoy owning my familiars before most other units.
07-31-2006, 06:10 PM#8
Mezzer
I think you can do that with a small change to the AI, but I have no idea how someone here should know though
07-31-2006, 07:35 PM#9
StockBreak
Uhm, perhaps you could give your familiar the "worker" classification by triggers. The only side effect is that it won't attack without orders, but it's Player controlled, right, so who cares?
07-31-2006, 08:20 PM#10
Sardius
Well its triggered to right-click on whatever unit the hero right-clicks on... Will that translate into an attack on a hostile unit if its worker classification?
07-31-2006, 08:30 PM#11
Scyze
Yup, that should work.
08-01-2006, 08:54 AM#12
King Klear
How about giving them that phase shift abiliti those little NE dragons have to avoid damage?
08-01-2006, 04:08 PM#13
Sardius
Well it works pretty good, except for the fact the familiar doesn't attack when the hero automaticly attacks or when the hero gets attacked, even though the familiar is patroling the hero. The familiar only attacks if you manually right click the enemy with the familiar, or the hero is issued a manual order to attack or right click the enemy, because of the trigger below. But in larger battles you're not often selecting every target manually with your hero, so in larger battles the familiar would most likely be sitting there doing absolutly nothing.

Trigger:
Familuar Follow Command
Collapse Events
Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object
Collapse Conditions
(Target unit of issued order) Not equal to Fam1
(Ordered unit) Equal to Hero1
Collapse Actions
Unit - Order Fam1 to Right-Click (Target unit of issued order)

So he has a worker classification now, but why is he not defending the hero when he is patrolling the hero at all times... And how come the above trigger only activates when you manually issue the order, as opposed to when the hero automaticly attacks? Because you can see on his command screen the "attack button" gets flagged and automaticly used when the hero gets attacked, so why does it not initiate the trigger?

I thought maybe doing an event "when hero aquires a target" have familiar "right click targeted unit" But unfortunatly my hero is a variable and for some dumb ass reason you can only select "when unit aquires a target" as a specific unit event, which can't use variable units, like my hero.

Because this below trigger fixes my problem entirly...

Trigger:
Familuar Follow Command Copy 2
Collapse Events
Unit - Thrack 0396 <gen> Acquires a target
Collapse Conditions
(Target unit of issued order) Not equal to Fam1
Collapse Actions
Unit - Order Fam1 to Right-Click (Targeted unit)

To bad that I can only select a specific unit for some anal reason and my hero is a variable unit, is there anything I can do about that?
08-02-2006, 05:45 PM#14
Sardius
Bloody hell, for *%$# sake! Ok well right after I perfected the system of attack priority, targeting and attacking along side the hero with the worker classification flag to make them a low priority target, a new problem I didn't notice reared its head...

Whenever the familiar isn't doing any actions, just stopped or hold position that friggin "free worker" icon appears in the lower left corner of the screen like you have a peasant that has no current task... Please say there is an easy way to fix that because the system I made from the triggers and worker classification works perfectly and I'd rather not have to abandon it over something like this.
08-02-2006, 06:39 PM#15
blu_da_noob
Don't add the worker classification in the object editor, add it via triggers during the game. The icon won't show up then.