Basically the script is supposed to auto re-target your hero when they select another target, not including when they don't have a hero (hero select) and when they are within X distance of their target, and their target belongs to player 9.
Ways it is working:
Letting me select a hero.
Auto re-target hero when selecting NPC.
Ways its not working:
Not allowing to target player 9's units
Canceling use of targeted spells. (Re-selecting the hero is canceling the action)
This is the only trigger I have with selection, and when its disabled everything works (not including the auto re-target).
Please post if anyone has any questions about this trigger. Also not worries about leaks right now, after all the triggers are set up I will go through and begin removing leaks.
Ways it is working:
Letting me select a hero.
Auto re-target hero when selecting NPC.
Ways its not working:
Not allowing to target player 9's units
Canceling use of targeted spells. (Re-selecting the hero is canceling the action)
This is the only trigger I have with selection, and when its disabled everything works (not including the auto re-target).
Please post if anyone has any questions about this trigger. Also not worries about leaks right now, after all the triggers are set up I will go through and begin removing leaks.
-
Lock to Hero
-
Events
- Player - Player 1 (Red) Selects a unit
- Player - Player 2 (Blue) Selects a unit
- Player - Player 3 (Teal) Selects a unit
- Player - Player 4 (Purple) Selects a unit
- Player - Player 5 (Yellow) Selects a unit
- Player - Player 6 (Orange) Selects a unit
- Player - Player 7 (Green) Selects a unit
- Player - Player 8 (Pink) Selects a unit
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Number of units in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) Equal to 0
-
And - All (Conditions) are true
-
Conditions
- (Number of units in (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) Equal to 1
- (Distance between (Position of (Triggering unit)) and (Position of (Random unit from (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))))) Less than or equal to 300.00
- (Color of (Owner of (Triggering unit))) Equal to Gray
-
Conditions
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Do nothing
-
Else - Actions
- Selection - Select (Random unit from (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))) for (Triggering player)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events