My unit is attacking an enemy unit but it doesnt attack back

Status
Not open for further replies.
Level 5
Joined
Feb 1, 2009
Messages
111
Scenario:

Enemy unit dark green is being attacked by my Player unit Red. While I'm attacking it, it's attacking my ally (Computer Blue) and will not change target to attack me, even if im very close to it.

If there are no other units around it will attack me and chase up to a point, but if its already engage with another enemy it wont change target.

Stats - Priority is given to my unit as 20 and the computer blue unit as 10..
 
Level 6
Joined
Feb 5, 2012
Messages
1,685
well thats common except if the computer blue becomes unattackable or you could trigger it..

Event - A unit is attack

Condition - Attacked unit is an enemy of attacking unit equal to true

Action - Unit - Order attacked unit to attack attacking unit..


Although its a very simple trigger it will solve your problem (since it affects everything) but you can add additional conditions like if the attacking unit is a hero ..etc..
 
Level 5
Joined
Feb 1, 2009
Messages
111
Well my map is complex and I cant just simply issue an attack command. There's pathing, there's attack-move happening elsewhere, and if I just issue an attack command it would only last for that 1 instance while I need it throughout the game.

I mean if Enemy unit A -> attacks allied computer B

but

Player controlled C (allied to B) attacks enemy unit A , i want A to change aggro to C ... (me)

Gameplay constants:
Guard distance - 500
Guard return distance - 500
Guard return time - 5

Object editor:

Priority set on max (20) for A and 1 for B, although i tried doing vice versa incase I had it wrong and still no effect.
 
Status
Not open for further replies.
Top