- Joined
- Jun 2, 2009
- Messages
- 1,233
Hello. I had an aggro trigger few years ago. It has flaws and one of my friends created it as Jass for me. But it has flaws too (check the pictures) and it seems it is a hard work to fix this and i have decided to create by myself as i did before. If you want to see details, just click to the link. [JASS] - Can someone help me to fix this issue?
Now i have started to re-create it again just like this.
My objective is this aggro duration should be 2 seconds, then units going to attack-move to location that i want.
How can i detect the attackers after 2 seconds and re-order them again
Detailed explanation: You are attacking my hero and i have a few allied footmens around me. They will start to attack you for x seconds, then they will attack-move to any location that i want. Because they have not to follow and attack you until they die
Bonus: But of course you can solve it by fixing the Jass code i have shared as a link.
The pictures shows the problem with my Jass trigger. It is just an example for you.
Now i have started to re-create it again just like this.
-
Player Attack 2 Copy
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
And - All (Conditions) are true
-
Conditions
-
((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
-
((Attacked unit) is A Hero) Equal to True
-
((Attacking unit) is A Hero) Equal to True
-
-
-
-
Actions
-
Unit Group - Pick every unit in (Units within 700.00 of (Position of (Attacked unit))) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Picked unit)) Equal to Player 1 (Red)
-
((Picked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
-
((Picked unit) is alive) Equal to True
-
((Picked unit) is A Hero) Equal to False
-
-
Then - Actions
-
Unit - Order (Picked unit) to Attack (Attacking unit)
-
Wait 2.00 seconds
-
Unit - Order (Picked unit) to Move To (Center of Region 000 <gen>)
-
-
Else - Actions
-
-
-
-
-
My objective is this aggro duration should be 2 seconds, then units going to attack-move to location that i want.
How can i detect the attackers after 2 seconds and re-order them again
Detailed explanation: You are attacking my hero and i have a few allied footmens around me. They will start to attack you for x seconds, then they will attack-move to any location that i want. Because they have not to follow and attack you until they die
Bonus: But of course you can solve it by fixing the Jass code i have shared as a link.
The pictures shows the problem with my Jass trigger. It is just an example for you.