Hi i will make a list for few triggers here and if someone can help me to optimize them and make less leaks i will appreciate it 
First Trigger
Second Trigger
If there are any leaks please tell me where and i will test it, thanks. I will add another triggers tomorrow
First Trigger
-
First Trigger
-

Events
-


Unit - A unit is starting to cast spell
-
-

Conditions
-


(Ability being cast) = Spell
-
-

Actions
-


Sound - Play Sound <gen> at 100.00% volume, attached to (Triggering unit)
-


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



If - Conditions
-




TempInteger1 < 1000
-
-



Then - Actions
-




Set TempInteger1 = (TempInteger1 + 1)
-
-



Else - Actions
-




Set TempInteger1 = 1
-
-
-


Set TP[1] = (Position of (Triggering unit))
-


Set TP[2] = (Target point of ability being cast)
-


Unit - Move (Triggering unit) instantly to TP[2]
-


Unit - Create 1 Hero (Dummy) for (Owner of (Triggering unit)) at TP[1] facing (Angle from TP[1] to TP[2]) degrees
-


Unit - Add a 0.50 second Ogólny expiration timer to (Last created unit)
-


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



If - Conditions
-




(Unit-type of (Triggering unit)) = Hero methamorphosis
-
-



Then - Actions
-




Unit - Hide (Last created unit)
-




Unit - Create 1 Hero methamophosis (Dummy) for (Owner of (Triggering unit)) at TP[1] facing (Angle from TP[1] to TP[2]) degrees
-
-



Else - Actions
-
-


Unit - Set the custom value of (Last created unit) to TempInteger1
-


Unit - Set the custom value of (Triggering unit) to TempInteger1
-


Unit Group - Add (Last created unit) to TG[1]
-


Unit Group - Add (Triggering unit) to TG[2]
-


Custom script: call RemoveLocation(udg_TP[1])
-


Custom script: call RemoveLocation(udg_TP[2])
-
-
-
Second Trigger
-

Events
-


Time - Every 0.05 seconds of game time
-
-

Conditions
-


Or - Any (Conditions) are true
-



Conditions
-




(TG[1] is empty) = NO
-




(TG[2] is empty) = NO
-
-
-
-

Actions
-


Unit Group - Pick every unit in TG[1] and do (Actions)
-



Loop - Actions
-




Set CV = (Custom value of (Picked unit))
-




Set TempInteger3[CV] = (TempInteger3[CV] + 10)
-




Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with (Real(TempInteger3[CV]))% transparency
-




Set TP[1] = (Position of (Picked unit))
-




Set TP[2] = (TP[1] offset by (Random real number between -10.00 and 10.00) towards (Random angle) degrees)
-




Unit - Move (Picked unit) instantly to TP[2]
-




Custom script: call RemoveLocation(udg_TP[1])
-




Custom script: call RemoveLocation(udg_TP[2])
-




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





If - Conditions
-






TempInteger3[CV] ">" or "=" 100
-
-





Then - Actions
-






Set TempInteger3[CV] = 0
-






Unit - Remove (Picked unit) from the game
-






Unit Group - Remove (Picked unit) from TG[1]
-
-





Else - Actions
-
-
-
-


Unit Group - Pick every unit in TG[2] and do (Actions)
-



Loop - Actions
-




Set CV = (Custom value of (Picked unit))
-




Set TempInteger4[CV] = (TempInteger4[CV] + 10)
-




Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with (100.00 - (Real(TempInteger4[CV])))% transparency
-




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





If - Conditions
-






TempInteger4[CV] ">" or "=" 100
-
-





Then - Actions
-






Set TempInteger4[CV] = 0
-






Unit Group - Remove (Picked unit) from TG[2]
-
-





Else - Actions
-
-
-
-
-
If there are any leaks please tell me where and i will test it, thanks. I will add another triggers tomorrow
Last edited:








