- Joined
- Nov 3, 2013
- Messages
- 989
I noticed that units attacking their own units lose priority, enemy units who had the attacking unit as their acquired target change target (even if they're standing right next to each other and other targets are farther away).
This became painfully obvious when I were testing a bit in single player and the enemy units begun attacking any nearby buildings (buildings with no attack and priority 1) as soon as I wanted to remove (kill) one of my buildings.
I made a new test map with a row of farms and two units, a ranged unit owned by myself on one side and an enemy footman on the other.
As soon as I ordered my rifleman to attack one of the farms the footman would attack the nearest farm, even if he were standing next to the rifleman.
Note that I had revealed the entire map to make sure that it didn't have to do with losing vision of the rifleman.
I tried to 'fix' it by making the attacking unit damage enemy units through trigger each time it's attacking but it didn't help.
In multiplayer it might not be that important since there would be more builder units and it's unlikely that they all would be attacking their own buildings/units at the same time (unless they know about this and do it intentionally).
Still it could be used as a way to make the enemy AI focus the other players, after all you don't have to complete the attack, spamming attack and interrupting the order to guarantee that you're the last person to be attacked would basically be cheating...
update: Now I've also tried adding multishot to also attack enemies when you're attacking your own units, they still changed targets as soon as I attacked one of my buildings regardless.
This became painfully obvious when I were testing a bit in single player and the enemy units begun attacking any nearby buildings (buildings with no attack and priority 1) as soon as I wanted to remove (kill) one of my buildings.
I made a new test map with a row of farms and two units, a ranged unit owned by myself on one side and an enemy footman on the other.
As soon as I ordered my rifleman to attack one of the farms the footman would attack the nearest farm, even if he were standing next to the rifleman.
Note that I had revealed the entire map to make sure that it didn't have to do with losing vision of the rifleman.
I tried to 'fix' it by making the attacking unit damage enemy units through trigger each time it's attacking but it didn't help.
-
Aggro
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Owner of (Attacking unit)) Not equal to Player 11 (Dark Green)
- (Owner of (Attacking unit)) Not equal to Player 12 (Brown)
- (Triggering player) Not equal to Player 11 (Dark Green)
- (Triggering player) Not equal to Player 12 (Brown)
-
Actions
- Game - Display to (All players) the text: (Name of (Triggering player))
- Game - Display to (All players) the text: (Name of (Attacking unit))
- Game - Display to (All players) the text: (Name of (Triggering unit))
-
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
-
Loop - Actions
- Unit - Cause (Attacking unit) to damage (Picked unit), dealing 1.00 damage of attack type Spells and damage type Normal
- Game - Display to (All players) the text: ((Name of (Owner of (Picked unit))) + ( + (Name of (Picked unit))))
-
Loop - Actions
-
Events
Still it could be used as a way to make the enemy AI focus the other players, after all you don't have to complete the attack, spamming attack and interrupting the order to guarantee that you're the last person to be attacked would basically be cheating...
update: Now I've also tried adding multishot to also attack enemies when you're attacking your own units, they still changed targets as soon as I attacked one of my buildings regardless.
Last edited: