- Joined
- Jan 3, 2008
- Messages
- 164
Could someone please help me to see if the code below contains too many leaks and if you can please tell me how can they be corrected. Thanks in advance!
Warning, this code is an eye killer! lol
Warning, this code is an eye killer! lol
-
Electric Explosions lvl1
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
-
And - All (Conditions) are true
-
Conditions
- (Ability being cast) Equal to Electric Explosions
- (Level of (Ability being cast) for (Casting unit)) Equal to 1
-
Conditions
-
And - All (Conditions) are true
-
Actions
- Set Chens_ability_tmppoint = (Target point of ability being cast)
- Set Chens_ability_point[1] = (Chens_ability_tmppoint offset by (150.00, 0.00))
- Set Chens_ability_point[2] = (Chens_ability_tmppoint offset by (100.00, 100.00))
- Set Chens_ability_point[3] = (Chens_ability_tmppoint offset by (0.00, 150.00))
- Set Chens_ability_point[4] = (Chens_ability_tmppoint offset by (-100.00, 100.00))
- Set Chens_ability_point[5] = (Chens_ability_tmppoint offset by (-150.00, 0.00))
- Set Chens_ability_point[6] = (Chens_ability_tmppoint offset by (-100.00, -100.00))
- Set Chens_ability_point[7] = (Chens_ability_tmppoint offset by (0.00, -150.00))
- Set Chens_ability_point[8] = (Chens_ability_tmppoint offset by (100.00, -100.00))
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
- Special Effect - Create a special effect at Chens_ability_point[(Integer A)] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
- Set Chens_ability[(Integer A)] = (Last created special effect)
- Set Chens_ability_unit_group[(Integer A)] = (Units within 200.00 of Chens_ability_point[(Integer A)] matching (((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to False))
-
Unit Group - Pick every unit in Chens_ability_unit_group[(Integer A)] and do (Actions)
-
Loop - Actions
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 50.00)
-
Loop - Actions
- Wait 0.26 seconds
- Special Effect - Destroy Chens_ability[(Integer A)]
- Custom script: call DestroyEffect(udg_Chens_ability[GetForLoopIndexA()])
- Custom script: call DestroyGroup(udg_Chens_ability_unit_group[GetForLoopIndexA()])
- Custom script: call RemoveLocation (udg_Chens_ability_point[GetForLoopIndexA()])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Integer A) Equal to 8
-
Then - Actions
- Custom script: call RemoveLocation (udg_Chens_ability_tmppoint)
-
Else - Actions
- Do nothing
-
If - Conditions
-
Loop - Actions
-
Events
Last edited: