- Joined
- Aug 2, 2010
- Messages
- 14
So I have made a MUI DoT spell and the only problem is that it laggs alot when units that are taking damage are on screen. I believe that this spell leaks alot but I don't know how to fix that. Can anyone help me and check why it lags and maybe fix it?
-
Fire Strike
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Flame Strike
-
-

Actions
-


Set Fdmg = (((((Real((Intelligence of (Triggering unit) (Include bonuses)))) x 3.00) + (50.00 x (Real((Level of Flame Strike for (Triggering unit)))))) x 3.00) / 18.00)
-


Set Ftime = 18.00
-


Set Fcaster = (Triggering unit)
-


Set Tpoint = (Target point of ability being cast)
-


Set tempgrp = (Units within 200.00 of Tpoint matching (((Matching unit) belongs to an enemy of (Owner of Fcaster)) Equal to True))
-


Unit Group - Pick every unit in tempgrp and do (Actions)
-



Loop - Actions
-




Unit Group - Add (Picked unit) to Fgroup
-




Hashtable - Save Fdmg as 10 of (Key (Picked unit)) in Hash
-




Hashtable - Save Ftime as 11 of (Key (Picked unit)) in Hash
-




Hashtable - Save Handle OfFcaster as 12 of (Key (Picked unit)) in Hash
-
-
-


Custom script: call DestroyGroup(udg_tempgrp)
-


Custom script: call RemoveLocation(udg_Tpoint)
-
-
-
FlameStrike DoT
-

Events
-


Time - Every 1.00 seconds of game time
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in Fgroup and do (Actions)
-



Loop - Actions
-




Set Fdmg = (Load 10 of (Key (Picked unit)) from Hash)
-




Set Ftime = (Load 11 of (Key (Picked unit)) from Hash)
-




Set Fcaster = (Load 12 of (Key (Picked unit)) in Hash)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






Ftime Greater than or equal to 3.00
-
-





Then - Actions
-






Unit - Cause Fcaster to damage (Picked unit), dealing Fdmg damage of attack type Spells and damage type Normal
-






Hashtable - Save (Ftime - 1.00) as 11 of (Key (Picked unit)) in Hash
-
-





Else - Actions
-






Unit Group - Remove (Picked unit) from Fgroup
-






Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hash
-
-
-
-
-
-
