Hello, why does this trigger nog function properly because of the "RemoveLocations". It triggers only once when i want it to trigger 3 times. It works perfectly if i remove the custom scripts but of course i want to clean the leaks...
-
Avalanche
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Avalanche
-
Actions
- Set VariableSet Avalanche_Caster = (Triggering unit)
- Set VariableSet Avalanche_Point = (Position of (Target unit of ability being cast))
- Trigger - Turn on Avalanche Loop <gen>
-
Events
-
Avalanche Loop
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
- Set VariableSet Avalanche_Count = (Avalanche_Count + 1)
- -------- --------
- Set VariableSet Avalanche_DummyPoint = Avalanche_Point
- Unit - Create 1 Avalanche Dummy for (Owner of Avalanche_Caster) at Avalanche_DummyPoint facing Default building facing degrees
- Set VariableSet Avalanche_Dummy = (Last created unit)
- Unit - Add Avalanche (Dummy) to Avalanche_Dummy
- Unit - Set level of Avalanche (Dummy) for Avalanche_Dummy to (Level of Avalanche for Avalanche_Caster)
- Unit - Add a 0.50 second Generic expiration timer to Avalanche_Dummy
- -------- --------
- Set VariableSet Avalanche_Level = (Level of Avalanche (Dummy) for Avalanche_Dummy)
- Set VariableSet Avalanche_Amount = (Avalanche_Damage[Avalanche_Level] + (3.00 x (Real((Intelligence of Avalanche_Caster (Include bonuses))))))
- Ability - Set Ability: (Unit: Avalanche_Dummy's Ability with Ability Code: Avalanche (Dummy))'s Real Level Field: Damage ('Htb1') of Level: (Avalanche_Level - 1) to Avalanche_Amount
- -------- --------
- Set VariableSet AvalancheLoop_Point = Avalanche_DummyPoint
- Set VariableSet Avalanche_Group = (Units within 1000.00 of AvalancheLoop_Point.)
-
Unit Group - Pick every unit in Avalanche_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) belongs to an enemy of (Owner of Avalanche_Caster).) Equal to True
- ((Picked unit) is alive) Equal to True
- ((Picked unit) is A structure) Equal to False
-
Then - Actions
- Unit - Order Avalanche_Dummy to Human Mountain King - Storm Bolt (Picked unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyGroup (udg_Avalanche_Group)
- Custom script: call RemoveLocation (udg_AvalancheLoop_Point)
- Custom script: call RemoveLocation (udg_Avalanche_DummyPoint)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Avalanche_Count Greater than or equal to 3
-
Then - Actions
- Trigger - Turn off (This trigger)
- Set VariableSet Avalanche_Count = 0
- Custom script: call RemoveLocation (udg_Avalanche_Point)
- Else - Actions
-
If - Conditions
-
Events