| 11-14-2004, 01:22 AM | #1 |
What determines what a unit given an "attack move-to" command will attack when it encounters many different types of units? (I am trying to get units controlled by the CPU to attack different types of units in a different order. I.E. attack other ground units, then hero, then structures) Thanks |
| 11-14-2004, 06:50 AM | #2 |
the way that i would endup doing that is: E: a generic unit is issued an order tagerting a unit C: unit is owned by *CPU Name* A: if number of units in ground units != 0 then attack random unit in ground units elseif number of units in hero type units != 0 then attack random unit in hero type units elseif number of units in building type units != 0 then attack random unit in building type units else order (ordered unit) to attack move to point of last order endif of corse this is pseudocode. |
| 11-14-2004, 06:14 PM | #3 |
that won't work, b/c orders to attack a unit make the attacker act differently than attack-moving does -- he will chase the unit forever. |
