Hello guys, thanks to your help, finally my HoT spell is done and working.
However, my question is,
1) does it need any more optimization then that? Does it look like it could be laggy? I plan to use it for most 10-20 units at a time. But I might need to duplicate it a few times for DoTs or other specific HoTs and use them all together.
2) Should I leave the timer to run ALWAYS, or turn it off if no unit needs healing etc.? Would it make any difference?
I did test already and looked fine, but on an empty map everything runs fine. Thanks !
However, my question is,
1) does it need any more optimization then that? Does it look like it could be laggy? I plan to use it for most 10-20 units at a time. But I might need to duplicate it a few times for DoTs or other specific HoTs and use them all together.
2) Should I leave the timer to run ALWAYS, or turn it off if no unit needs healing etc.? Would it make any difference?
I did test already and looked fine, but on an empty map everything runs fine. Thanks !
-
HoT Group
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Inner Fire
-
-
Actions
-
Hashtable - Save 30 as 0 of (Key (Target unit of ability being cast)) in HotHash
-
Hashtable - Save ((Intelligence of (Casting unit) (Include bonuses)) x 4) as 1 of (Key (Target unit of ability being cast)) in HotHash
-
Unit Group - Add (Target unit of ability being cast) to HoTGroup
-
-
-
HoT Group Timer Copy
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in HoTGroup and do (Actions)
-
Loop - Actions
-
Set HotAmount = (Load 1 of (Key (Picked unit)) from HotHash)
-
Set HoTRemainingTicks = (Load 0 of (Key (Picked unit)) from HotHash)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HoTRemainingTicks Greater than 0
-
-
Then - Actions
-
Game - Display to (All players) the text: (String(HoTRemainingTicks))
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (Real(HotAmount)))
-
Game - Display to (All players) the text: (String(HotAmount))
-
Hashtable - Save (HoTRemainingTicks - 1) as 0 of (Key (Picked unit)) in HotHash
-
-
Else - Actions
-
Game - Display to (All players) the text: Remove from group
-
Unit Group - Remove (Picked unit) from HoTGroup
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in HotHash
-
-
-
-
-
-