13lade619
is now a game developer :)
- Reaction score
- 398
okay, sorry about the caster_loc leak,
what should i do about the group leak?
EDIT:
this is what the trigger looks like now:
i moved the leak removal from the if/then/else function.
one question:
can i remove this unit group loop and just paste the functions under the loop below the wait?
EDIT # 2 :
i removed the second unit group loop.
Re-uploaded the map. it should be leak-free by now.
-
what should i do about the group leak?
EDIT:
this is what the trigger looks like now:
Code:
Calamity Strike
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Calamity Strike
Actions
Set CS_Caster = (Triggering unit)
If ((Level of Calamity Strike for CS_Caster) Equal to 1) then do (Set CS_Loops = 10) else do (Do nothing)
If ((Level of Calamity Strike for CS_Caster) Equal to 2) then do (Set CS_Loops = 15) else do (Do nothing)
If ((Level of Calamity Strike for CS_Caster) Equal to 3) then do (Set CS_Loops = 20) else do (Do nothing)
For each (Integer A) from 1 to CS_Loops, do (Actions)
Loop - Actions
Set CS_Caster_loc = (Position of CS_Caster)
Set CS_TargetGroup = (Units within 1000.00 of CS_Caster_loc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of CS_Caster)) Equal to True)))
Set CS_RealTargetGroup = (Random 1 units from CS_TargetGroup)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in CS_TargetGroup) Greater than 0
(CS_Caster is alive) Equal to True
Then - Actions
Unit Group - Pick every unit in CS_RealTargetGroup and do (Actions)
Loop - Actions
Set CS_Target = (Picked unit)
Set CS_Point = (Position of CS_Target)
Unit - Create 1 Dummy for (Owner of CS_Caster) at CS_Point facing Default building facing degrees
Unit - Add Crow Form to (Last created unit)
Animation - Change (Last created unit) flying height to 1000.00 at 1000000000.00
Unit - Add LightningFX to (Last created unit)
Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning CS_Target
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Wait 0.10 seconds
Unit Group - Pick every unit in CS_RealTargetGroup and do (Actions)
Loop - Actions
Unit - Create 1 Dummy for (Owner of CS_Caster) at CS_Point facing Default building facing degrees
Unit - Add CalamityStrikeDamage to (Last created unit)
Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Special Effect - Create a special effect at CS_Point using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Custom script: call DestroyGroup(udg_CS_TargetGroup)
Custom script: call RemoveLocation(udg_CS_Point)
Custom script: call DestroyGroup(udg_CS_RealTargetGroup)
Custom script: call RemoveLocation(udg_CS_Caster_loc)
Wait 1.00 seconds
one question:
can i remove this unit group loop and just paste the functions under the loop below the wait?
Code:
Unit Group - Pick every unit in CS_RealTargetGroup and do (Actions)
Loop - Actions
Unit - Create 1 Dummy for (Owner of CS_Caster) at CS_Point facing Default building facing degrees
Unit - Add CalamityStrikeDamage to (Last created unit)
Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Special Effect - Create a special effect at CS_Point using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Special Effect - Destroy (Last created special effect)
i removed the second unit group loop.
Re-uploaded the map. it should be leak-free by now.
-
