Next question, again I can't seem to find the answer elsewhere.
I created a trigger to attempt to make towers prioritize champions last when choosing their next target. It looks something like this:
By using Game - Display to all players the text x I've deturmined that yes, the trigger does run the then - actions when I want them to and do not run them when I don't want them to, however the tower doesn't show any change when the trigger is called in game, and just continues attacking the hero.
PS - I've tried Unit - Order (Triggering Unit) to Stop as well as and instead of (on different occasions) Unit - Order Triggering Unit) to Attack tempUnit. Stop does not seem to stop the tower from attacking either way.
PPS - Yes I know this function leaks a group or 2, but I'd rather get it working before I clean it up leak wise.
I created a trigger to attempt to make towers prioritize champions last when choosing their next target. It looks something like this:
- Don't Attack Champs
-
Events
- Unit - Dark Tower lvl 1 0128 <gen> Aquires a target
- // Similar events for all other towers desired - other triggers add more events for new towers when they're created
-
Conditions
- ((Targeted Unit) is A Hero) Equal to True
-
Actions
- Set TempGroup = (Units within 512 of (Position of (Triggering Unit)) matching ((((Matching Unit) belongs to an enemy of (Owner of (Triggering Unit))) Equal to True) and (((Matching Unit) is alive) Equal to True)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in TempGroup) Greater then 0
-
Then - Actions
- Set tempUnit = (Random unit from TempGroup)
- Unit - Order (Triggering Unit) to Attack tempUnit
- Else - Actions
-
If - Conditions
PS - I've tried Unit - Order (Triggering Unit) to Stop as well as and instead of (on different occasions) Unit - Order Triggering Unit) to Attack tempUnit. Stop does not seem to stop the tower from attacking either way.
PPS - Yes I know this function leaks a group or 2, but I'd rather get it working before I clean it up leak wise.