I use AC animations. Animation engine: Sprite Unity
I would like to be able to trigger animations via script. I have tried to play an animation directly via the animator, but it looks like AC overwrites it. I also tried to replace the default idle animation with:
AC.ActionCharAnim.CreateNew_SpritesUnity_SetStandard(KickStarter.player, AC.AnimStandard.Idle, “Buster_explode”);
This does not work although it works via action nodes. What am I doing wrong?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
With Sprites Unity, yes - AC will be in control over the animation playback. Unless, that is, you set the character's "charState" to Custom first:
With Sprites Unity Complex, however, animation is entirely transition-based, so it's the better choice if you need to override behaviour through script often.
Thanks! That works for me.
It looks like this only works if there is a time between set movement false and playing of a custom animation. Anything less than 0.5f sec results in the animation not playing, anything above works.
Is there a clean solution for this? I only need custom animations in rare exceptions so it would be good if I don't have to change everything.
What is the Player's state at the time? Are they moving?
Try calling their Halt function to stop them moving immediately.
Yes that works. Thanks again!