- Joined
- Nov 3, 2013
- Messages
- 989
I'm playing an animation then after a short while I change the animation speed to a negative value so that it then get played backwards.
However afterwards the unit doesn't play it's stand animations while it's idle.
I tried a few obvious things and you can see them there (Naturally I didn't always have them all enabled each test every time)
Edit: Initially I were using channel instead of berzerk but I thought that maybe the problem came from playing the animation from the ability and then overriding it but there were no difference between triggering the initial animation or using it from an ability.
However afterwards the unit doesn't play it's stand animations while it's idle.
-
Constants
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- --------------------- --------
-
-------- How many seconds --------
-
Set AnimationTime = 1.37
-
-------- --------------------- --------
-
-------- Converted for integer in periodic event --------
-
Set AnimationTime_Converted = (Integer((AnimationTime / 0.03)))
-
-------- --------------------- --------
-
-
-
Untitled Trigger 001
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Berserk
-
-
Actions
-
Set u = (Triggering unit)
-
Animation - Change u's animation speed to 50.00% of its original speed
-
Custom script: call SetUnitTimeScale(udg_u, 0.50)
-
Animation - Play u's death animation
-
Animation - Queue u's stand animation
-
Trigger - Turn on Untitled Trigger 002 <gen>
-
-
-
Untitled Trigger 002
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
i Equal to AnimationTime_Converted
-
-
Then - Actions
-
Custom script: call SetUnitTimeScale(udg_u, -0.50)
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
i Equal to (AnimationTime_Converted x 2)
-
-
Then - Actions
-
Custom script: call SetUnitTimeScale(udg_u, 1.00)
-
Set i = 0
-
Animation - Play u's stand animation
-
Animation - Reset u's animation
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
Set i = (i + 1)
-
-
-
-
-
-
Edit: Initially I were using channel instead of berzerk but I thought that maybe the problem came from playing the animation from the ability and then overriding it but there were no difference between triggering the initial animation or using it from an ability.