Okay so I have 4 variables in this example.
1 - A_Player_Unit - This is a unit variable.
2 - A_Aggro_Player - This is a player variable.
3 - A_Range_Aggro - This is a unit variable.
4 - A_Aggroing_Player - This is a player variable.
So basically what this trigger does is detects any neutral passive units within units of player 1, changes the neutral passive unit to player 8, removes the wander spell and orders the player 8 unit to attack the player 1 unit.
The two lines
Here is a link (http://www.hiveworkshop.com/forums/spells-569/aggro-system-v1-1-a-229468/) to the system and the other triggers if you need to see them.
Thanks for your time.
1 - A_Player_Unit - This is a unit variable.
2 - A_Aggro_Player - This is a player variable.
3 - A_Range_Aggro - This is a unit variable.
4 - A_Aggroing_Player - This is a player variable.
So basically what this trigger does is detects any neutral passive units within units of player 1, changes the neutral passive unit to player 8, removes the wander spell and orders the player 8 unit to attack the player 1 unit.
-
Range Aggro
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- Set A_Player_Unit = (Random unit from (Units owned by (Random player from A_Aggro_Player)))
- Set A_Range_Aggro = (Random unit from (Units within 300.00 of (Position of A_Player_Unit)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (A_Player_Unit has buff Wind Walk) Equal to False
-
Then - Actions
-
Player Group - Pick every player in A_Aggro_Player and do (Actions)
-
Loop - Actions
- Set A_Triggering_Player = (Picked player)
-
Loop - Actions
-
Player Group - Pick every player in A_Aggroing_Player and do (Actions)
-
Loop - Actions
- Set A_Changing_Player = (Picked player)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of A_Player_Unit) Equal to A_Triggering_Player
- (Owner of A_Range_Aggro) Equal to A_Changing_Player
-
Then - Actions
- Unit - Remove Wander (Neutral) from A_Range_Aggro
- Unit - Change ownership of A_Range_Aggro to Player 8 (Pink) and Change color
- Unit - Order A_Range_Aggro to Attack A_Player_Unit
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Player Group - Pick every player in A_Aggro_Player and do (Actions)
- Else - Actions
-
If - Conditions
-
Events
- Set A_Player_Unit = (Random unit from (Units owned by (Random player from A_Aggro_Player)))
- Set A_Range_Aggro = (Random unit from (Units within 300.00 of (Position of A_Player_Unit)))
Here is a link (http://www.hiveworkshop.com/forums/spells-569/aggro-system-v1-1-a-229468/) to the system and the other triggers if you need to see them.
Thanks for your time.