edited June 5 in ORK Support
Hiya,

I want to use a custom animations system/ the animator and I want to transitions from idle to attack. On my attack, I have a bool isAttacking, and want to switch that on when a character attacks.

In Base control > Animations > Custom Animations I added a custom animation with type attack, function name isAttacking > parameter type bool.

in Combatants > "Character" > Animation settings > System type custom, and component name the name of the animator.

I cant get this to work, am I doing this right?
Post edited by Anoo on
  • Custom animations call functions, so you'd need a function like this to work with your setup:
    public void YourFunction(bool value)
    {
    // do your stuff
    }


    However, if you just want to use animators and their parameters, you should use the Mecanim Settings of the animations. E.g. check this gameplay tutorial for some basics on using Mecanim/animators with ORK.

    If you manage your animator via a custom script, the custom animations are the way to go, though - you just need to use functions that are called instead of fields/properties.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks that helped a lot!
  • Thought i'd continue this thread instead of starting a new one for future people to have anything in 1 place.

    As you say the function need to be declared for custom animations. This sounds very logical, but on what class?
  • edited November 16
    Yeah, that might be a bit confusing - the name of the class (component) is defined in the combatant's Animation & Movement setup, where the combatant's animation System Type determines which animation system is used. When using a Custom system, you can define the class name - and the combatant's animations will try to call the defined functions of the custom animation setup on that class.

    This allows you to use different classes for different combatants, but still share the same animation setup if the functions match between the classes :)
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.