Hi, i'm wondering why my trigger is leaking, as i'm destroying groups and locations. Is it the fact i use "Unit-type" in my conditions ?
This trigger, with 2 other ones, is made to creat an AI for summoned minions. This one TP them if they are too far from the hero, or order them to "follow" him if he is not attacking (He is concidered not attacking after 3 sec. : i use ZDemoCompteurAttaque[X] for this)
If you need more infos just ask.
Where are leaks please
Thanks in advance !
-
H Demo follow
- Events
- Conditions
-
Actions
-
For each (Integer A) from 1 to 10, do (Actions)
-
Boucle - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Number of living Chien des enfers units owned by (Player((Integer A)))) > 0
- (Number of living Guerrier squelette units owned by (Player((Integer A)))) > 0
- (Number of living Mage squelette units owned by (Player((Integer A)))) > 0
- (Number of living Archer squelette units owned by (Player((Integer A)))) > 0
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set PointTemp2 = (Position of Heroes[(Integer A)])
- Set GroupeTemp1 = (Units owned by (Player((Integer A))) matching ((((Matching unit) is alive) = TRUE) and ((((Unit-type of (Matching unit)) = Guerrier squelette) or ((Unit-type of (Matching unit)) = Chien des enfers)) or (((Unit-type of (Matching unit)) = ...
-
Unit group - Pick every unit in GroupeTemp1 and do (Actions)
-
Boucle - Actions
- Set PointTemp1 = (Position of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between PointTemp1 and PointTemp2) >= 1500.00
-
Then - Actions
- Custom script: call RemoveLocation (udg_PointTemp1)
- Set PointTemp1 = (PointTemp2 offset by 100.00 towards (Facing of Heroes[(Integer A)]) degrees)
- Unit - Move (Picked unit) instantly to PointTemp2
- Unit - Order (Picked unit) to Stop
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation (udg_PointTemp1)
-
Boucle - Actions
- Custom script: call DestroyGroup (udg_GroupeTemp1)
- Custom script: call RemoveLocation (udg_PointTemp2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Remaining time for ZDemoCompteurAttaque[(Integer A)]) = 0.00
-
Then - Actions
- Set PointTemp1 = (Position of Heroes[(Integer A)])
- Set PointTemp2 = (PointTemp1 offset by 100.00 towards ((Facing of Heroes[(Integer A)]) + 90.00) degrees)
- Set GroupeTemp1 = (Units owned by (Player((Integer A))) matching ((((Matching unit) is alive) = TRUE) and (((Unit-type of (Matching unit)) = Guerrier squelette) or (((Unit-type of (Matching unit)) = Mage squelette) or ((Unit-type of (Matching unit)) Egal = ...
-
Groupe unit - Pick every unit in GroupeTemp1 and do (Actions)
-
Boucle - Actions
- Unit - Order (Picked unit) to Go to PointTemp2
-
Boucle - Actions
- Custom script: call RemoveLocation (udg_PointTemp1)
- Custom script: call RemoveLocation (udg_PointTemp2)
- Custom script: call DestroyGroup (udg_GroupeTemp1)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Boucle - Actions
-
For each (Integer A) from 1 to 10, do (Actions)
This trigger, with 2 other ones, is made to creat an AI for summoned minions. This one TP them if they are too far from the hero, or order them to "follow" him if he is not attacking (He is concidered not attacking after 3 sec. : i use ZDemoCompteurAttaque[X] for this)
If you need more infos just ask.
Where are leaks please
Thanks in advance !