I ask because I want total control of my animations and I want them to be synced up with the framerate as well. I also want to be able to reverse my animation and slow it down with ease. I tried myself but I wonder if perhaps there is a better and more efficient way.
Here's an example of how I'm doing the Idle animation
This is just an example
1. X velocity = 0 > Force animation frame to Alt value Idle of ("Player")
2.Backward or forward Alt string of("Player") = "Forward" > Add 0.20 of Idle of ("Player")
+Animation stopped is playing
3.Backward or forward Alt string of("Player") = "Backward" > Subtract 0.20 of Idle of ("Player")
+Animation stopped is playing
the 0.20 is gonna be another Alterable value(Speed) so I can edit it easily and I'll be able to change the speed of my animations with ease.
This is for the loop of the animation which I'm not sure is necessary or not
Idle of ("Player") is > 7 then > set Idle of ("Player") to 0
Idle of ("Player") is < 0 then > set Idle of ("Player") to 8
I am having some issues though. Since I'm using floats for the alts and the animation frames don't operate in floats the frame will change to the next frame at for example
Alt value = 2.25 Frame anim = 3
instead I want it to be
Alt value = 2.25 Frame anim =2
and then when alt value reaches 3 it will change to 3 and stay 3 until alt value equals 4
It would be easier if the animations operated in floats too
Originally Posted by DudeHuge I am having some issues though. Since I'm using floats for the alts and the animation frames don't operate in floats the frame will change to the next frame at for example
Alt value = 2.25 Frame anim = 3
instead I want it to be
Alt value = 2.25 Frame anim =2
Use the floor() function to remove the decimal places without rounding up. The floor function you be used in the expression editor like so:
Floor(2.25) = 2
Or
Floor(Alterable Value A("animation")) = blah