Moderator
M
Moderator
01:27, 31st Dec 2012
Magtheridon96: Approved.
Magtheridon96: Approved.
SE Setup

Events


Map initialization

Conditions

Actions


Custom script: set udg_SE_Hashtable = InitHashtable()


-------- \\\\\\\\\\ --------


-------- CONFIGURABLES --------


-------- \\\\\\\\\\ --------


-------- The ability --------


Set SE_Ability = Soul Extract


-------- \\\\\\\\\\ --------


-------- The dummy unit (Soul) --------


Set SE_DummyType = Soul Extract (Dummy)


-------- \\\\\\\\\\ --------


-------- Interval per Soul Extract --------


Set SE_IntervalSetup[1] = 1.00


Set SE_IntervalSetup[2] = 0.75


Set SE_IntervalSetup[3] = 0.50


-------- \\\\\\\\\\ --------


-------- The spell duration --------


Set SE_DurationSetup[1] = 3.00


Set SE_DurationSetup[2] = 4.00


Set SE_DurationSetup[3] = 5.00


-------- \\\\\\\\\\ --------


-------- The soul duration --------


Set SE_SoulDurationSetup[1] = 2.00


Set SE_SoulDurationSetup[2] = 4.00


Set SE_SoulDurationSetup[3] = 6.00
SE Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to SE_Ability

Actions


Set SE_MaxIndex = (SE_MaxIndex + 1)


Set TempInt = (Level of SE_Ability for (Triggering unit))


Set SE_Duration[SE_MaxIndex] = SE_DurationSetup[TempInt]


Set SE_Interval[SE_MaxIndex] = SE_IntervalSetup[TempInt]


Set SE_IntervalCounter[SE_MaxIndex] = SE_Interval[SE_MaxIndex]


Set SE_Target[SE_MaxIndex] = (Target unit of ability being cast)


Set SE_SoulDuration[SE_MaxIndex] = SE_SoulDurationSetup[TempInt]


Trigger - Turn on SE Loop <gen>
SE Hit

Events


Game - DamageEvent becomes Equal to 1.00

Conditions


(DamageEventTarget is in SE_Group) Equal to True

Actions


Custom script: set udg_SE_Key = GetHandleId(udg_DamageEventTarget)


Unit - Cause DamageEventSource to damage (Load 0 of SE_Key in SE_Hashtable), dealing DamageEventAmount damage of attack type Hero and damage type Normal
SE Die

Events


Unit - A unit Dies

Conditions


(Unit-type of (Triggering unit)) Equal to SE_DummyType

Actions


Set TempUnit = (Triggering unit)


Custom script: set udg_SE_Key = GetHandleId(udg_TempUnit)


Hashtable - Clear all child hashtables of child SE_Key in SE_Hashtable


Unit Group - Remove TempUnit from SE_Group


Unit - Remove TempUnit from the game
SE Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


For each (Integer SE_CurrentIndex) from 1 to SE_MaxIndex, do (Actions)



Loop - Actions




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





If - Conditions






SE_Duration[SE_CurrentIndex] Greater than 0.00






(SE_Target[SE_CurrentIndex] is alive) Equal to True





Then - Actions






Set SE_Duration[SE_CurrentIndex] = (SE_Duration[SE_CurrentIndex] - 0.03)






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







If - Conditions








SE_IntervalCounter[SE_CurrentIndex] Less than SE_Interval[SE_CurrentIndex]







Then - Actions








Set SE_IntervalCounter[SE_CurrentIndex] = (SE_IntervalCounter[SE_CurrentIndex] + 0.03)







Else - Actions








Set TempLoc = (Position of SE_Target[SE_CurrentIndex])








Unit - Create 1 SE_DummyType for Neutral Hostile at TempLoc facing Default building facing degrees








Set TempUnit = (Last created unit)








Animation - Change TempUnit's vertex coloring to (100.00%, 0.00%, 0.00%) with 50.00% transparency








Unit - Add a SE_SoulDuration[SE_CurrentIndex] second Generic expiration timer to TempUnit








Custom script: set udg_SE_Key = GetHandleId(udg_TempUnit)








Hashtable - Save Handle OfSE_Target[SE_CurrentIndex] as 0 of SE_Key in SE_Hashtable








Unit Group - Add TempUnit to SE_Group








Set SE_IntervalCounter[SE_CurrentIndex] = 0.00








Custom script: call RemoveLocation(udg_TempLoc)





Else - Actions






Set SE_Duration[SE_CurrentIndex] = SE_Duration[SE_MaxIndex]






Set SE_Interval[SE_CurrentIndex] = SE_Interval[SE_MaxIndex]






Set SE_IntervalCounter[SE_CurrentIndex] = SE_IntervalCounter[SE_MaxIndex]






Set SE_Target[SE_CurrentIndex] = SE_Target[SE_MaxIndex]






Set SE_SoulDuration[SE_CurrentIndex] = SE_SoulDuration[SE_MaxIndex]






Set SE_CurrentIndex = (SE_CurrentIndex - 1)






Set SE_MaxIndex = (SE_MaxIndex - 1)






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







If - Conditions








SE_MaxIndex Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions