How can i make a time freeze spell that will pause/set animation speed to 0% to all enemy units around. Those units i want them to be invulnerable while paused and my problem is i don't know how to do wait to unpause/set animation speed to 100%. Can some 1 help me?Here are the triggers:
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Scream of Fear
-
Actions
- Set Vampire_Fear_Units[1] = (Triggering unit)
- Set Vampire_Fear_Point[1] = (Position of Vampire_Fear_Units[1])
- Set Vampire_Fear_Group[1] = (Units within 500.00 of Vampire_Fear_Point[1] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) Not equal to Vampire_Fear_Units[1]) and ((((Matching unit) is alive) Equal
-
Unit Group - Pick every unit in Vampire_Fear_Group[1] and do (Actions)
-
Loop - Actions
- Unit - Pause (Picked unit)
- Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
- Unit - Create 1 Scream of Fear Dummy for (Owner of Vampire_Fear_Units[1]) at Vampire_Fear_Point[1] facing Default building facing degrees
- Set Vampire_Fear_Units[2] = (Last created unit)
- Unit - Add Scream of Fear (Sleep) to Vampire_Fear_Units[2]
- Unit - Set level of Scream of Fear (Sleep) for Vampire_Fear_Units[2] to (Level of Scream of Fear for Vampire_Fear_Units[1])
- Unit - Order Vampire_Fear_Units[2] to Undead Dreadlord - Sleep (Picked unit)
- Unit - Add a 1.00 second Generic expiration timer to Vampire_Fear_Units[2]
- Set Vampire_Fear_Units[3] = (Picked unit)
- Unit Group - Add (Picked unit) to Vampire_Fear_Group[2]
-
Loop - Actions
- Wait until ((Vampire_Fear_Units[3] has buff Scream of Fear (3) ) Equal to False), checking every 0.10 seconds
-
Unit Group - Pick every unit in Vampire_Fear_Group[2] and do (Actions)
-
Loop - Actions
- Unit - Unpause (Picked unit)
- Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
-
Loop - Actions
- Unit Group - Remove all units from Vampire_Fear_Group[1]
- Unit Group - Remove all units from Vampire_Fear_Group[2]
- Custom script: call DestroyGroup(udg_Vampire_Fear_Group[1])
- Custom script: call DestroyGroup(udg_Vampire_Fear_Group[2])
- Custom script: call RemoveLocation(udg_Vampire_Fear_Point[1])