Hey all,
I made ability that creates field which freezes all enemy units who enter it and everything works fine except the units wont unfreeze when die or when field disappears..
Can anyone tell me what i did wrong?
I made ability that creates field which freezes all enemy units who enter it and everything works fine except the units wont unfreeze when die or when field disappears..
-
Time Prison
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Time Prison
-
-
Actions
-
Set TimePrisonPoint[1] = (Target point of ability being cast)
-
Set TimePrisonCaster = (Casting unit)
-
Set TimePrisonDuration[1] = (((Real((Level of Time Prison for TimePrisonCaster))) x 1.00) + 4.00)
-
Set TimePrisonDuration[2] = 0.00
-
Unit - Create 1 Dummy Circle for (Owner of TimePrisonCaster) at TimePrisonPoint[1] facing Default building facing degrees
-
Set TimePrisonDummy = (Last created unit)
-
Animation - Play TimePrisonDummy's Large animation
-
Animation - Change TimePrisonDummy's animation speed to 0.00% of its original speed
-
Unit - Add a TimePrisonDuration[1] second Generic expiration timer to TimePrisonDummy
-
Custom script: call RemoveLocation(udg_TimePrisonPoint[1])
-
Set TimePrisonPoint[1] = (Position of TimePrisonDummy)
-
Set TimePrisonUnitGroup[1] = (Units within 400.00 of TimePrisonPoint[1] matching (((Matching unit) belongs to an enemy of (Owner of TimePrisonCaster)) Equal to True))
-
Unit Group - Pick every unit in TimePrisonUnitGroup[1] and do (Actions)
-
Loop - Actions
-
Unit - Pause (Picked unit)
-
Animation - Change (Picked unit)'s animation speed to 0.01% of its original speed
-
Unit Group - Add (Picked unit) to TimePrisonUnitGroup[2]
-
-
-
Custom script: call DestroyGroup(udg_TimePrisonUnitGroup[1])
-
Trigger - Turn on Time Prison2 <gen>
-
Wait TimePrisonDuration[1] seconds
-
Trigger - Turn off Time Prison2 <gen>
-
-
-
Time Prison2
-
Events
-
Time - Every 0.04 seconds of game time
-
-
Conditions
-
Actions
-
Set TimePrisonDuration[2] = (TimePrisonDuration[2] + 0.04)
-
Set TimePrisonUnitGroup[1] = (Units within 400.00 of TimePrisonPoint[1] matching (((Matching unit) belongs to an enemy of (Owner of TimePrisonCaster)) Equal to True))
-
Unit Group - Pick every unit in TimePrisonUnitGroup[1] and do (Actions)
-
Loop - Actions
-
Unit - Pause (Picked unit)
-
Animation - Change (Picked unit)'s animation speed to 0.01% of its original speed
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is in TimePrisonUnitGroup[2]) Equal to False
-
-
Then - Actions
-
Unit Group - Add (Picked unit) to TimePrisonUnitGroup[2]
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup(udg_TimePrisonUnitGroup[1])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TimePrisonDuration[2] Greater than or equal to TimePrisonDuration[1]
-
-
Then - Actions
-
Unit Group - Pick every unit in TimePrisonUnitGroup[2] and do (Actions)
-
Loop - Actions
-
Unit - Unpause (Picked unit)
-
Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
-
Trigger - Turn off (This trigger)
-
-
-
Custom script: call RemoveLocation(udg_TimePrisonPoint[1])
-
Custom script: call DestroyGroup(udg_TimePrisonUnitGroup[2])
-
-
Else - Actions
-
-
-
-
Time Prison3
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Dying unit) is in TimePrisonUnitGroup[2]) Equal to True
-
-
Actions
-
Unit - Unpause (Dying unit)
-
Animation - Change (Dying unit)'s animation speed to 100.00% of its original speed
-
-