- Joined
- May 16, 2020
- Messages
- 663
Hi all,
I want to re-create the ability "Time Lock" from Dota. It's basically Bash with a trigger that freezes the animation of a unit when stunned.
My triggers work for 1 stunned unit. But as soon as 2 units are affected by the stun, the trigger bugs out: The first stunned unit's animation is frozen forever, while the 2nd stunned unit works normal.
Does anyone have a clever idea how to solve this, while keeping this as performance friendly as possible? (I don't want to have a 0.05 interval running 24/7 in the background)
Thanks!
I want to re-create the ability "Time Lock" from Dota. It's basically Bash with a trigger that freezes the animation of a unit when stunned.
My triggers work for 1 stunned unit. But as soon as 2 units are affected by the stun, the trigger bugs out: The first stunned unit's animation is frozen forever, while the 2nd stunned unit works normal.
Does anyone have a clever idea how to solve this, while keeping this as performance friendly as possible? (I don't want to have a 0.05 interval running 24/7 in the background)
Thanks!
-
Time Lock new
-

Events
-


Game - GDD_Event becomes Equal to 0.00
-
-

Conditions
-


(GDD_DamagedUnit has buff Time Lock (Pause)) Equal to True
-
-

Actions
-


Set VariableSet TimeLock_Count = (TimeLock_Count + 1)
-


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



If - Conditions
-




TimeLock_Count Greater than Universal_CountMaxSize
-
-



Then - Actions
-




Set VariableSet TimeLock_Count = 1
-
-



Else - Actions
-
-


Custom script: set udg_TimeLock_Group[udg_TimeLock_Count] = CreateGroup()
-


Unit Group - Add GDD_DamagedUnit to TimeLock_Group[TimeLock_Count]
-


Trigger - Turn on Time Lock Loop <gen>
-
-
-
Time Lock Loop
-

Events
-


Time - Every 0.05 seconds of game time
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in TimeLock_Group[TimeLock_Count] and do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






((Picked unit) has buff Time Lock (Pause)) Equal to True
-
-





Then - Actions
-






Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl
-






Special Effect - Destroy (Last created special effect)
-






Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
-
-





Else - Actions
-






Unit Group - Remove (Picked unit) from TimeLock_Group[TimeLock_Count].
-






Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
-
-
-
-
-


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



If - Conditions
-




(Number of units in TimeLock_Group[TimeLock_Count]) Equal to 0
-
-



Then - Actions
-




Trigger - Turn off (This trigger)
-




Custom script: call DestroyGroup (udg_TimeLock_Group[udg_TimeLock_Count])
-
-



Else - Actions
-
-
-
