Animation Trigger while transitioning

Hi! i’m trying to polish some aspects of my skill system and i’m having troubles with the animation transition between skills.

First let me explain a litle about the system and how it goes with the animations.

My abilities are a component that is added into the character, when you want to trigger an ability, you first go into this ability method.

if all requirements are met (not in cooldown, can play with current weapon, etc).
it calls the character method “PlaySkill” and sends the animation as a parameter.

this is “PlaySkill” method.

6391061--712514--upload_2020-10-7_1-32-7.png

and this is the animator state and transition

so you first go into the skill component , then the character overrides the animation of “SkillGeneric” and plays it by triggering the “SkillGeneric” parameter trigger on the animator.

as soon as the “skill generic” animation starts, i set the flags of “IsPlayingSkill” with a event on the animation.

What is the problem?

i cant use transition on “Any State” → Skill Generic because if you keep the skill button down, you will be sending a bunch of triggers every second and it will keep restarting the initial transition.

anyone have any idea on how to fix it or an alternative?

my final goal is:

  • To have transitions between skills
  • To be able to keep the skill button press and the animation waits until it finish before it plays again (or plays a diferent animation)
  • To not be able to cast a diferent animation while one is already playing if i want to
  • To be able to interrupt some animations while playing if i want to

this is already working, the only problem so far is when i include transitions, because during that litle transition time the flags are not triggered yet.

if there’s any question please feel free to ask, i know its bad explained. Thanks in advance!.

I think you just need to mark the transition as not being allowed to transition to self
6393101--712811--loop.PNG

As far as the other goals go. I think there’s a lot of ways to go about this depending on the amount of animations that are expected when it’s all said and done. If I were implementing this from an animators point of view, rather than having the programmer do an override code side I’d rather have parameter of type INT called something like “Skill ID”, which lets me know which skill I should be playing animations for. I’d then add another param called “Random ID” (which is set to a random number on the same frame the trigger is set. I’d then use the random number to play different animations. The nice thing about this is I now have the freedom to implement my own logic for how the animations play and blend off of one another.
SkillGeneric could be a sub-stat machine with all the different skill set animations. OR maybe you make it a layer that blends over top of the base layer. In the layer situation I usually make a node (with no animation assigned) and label it “LOWER LAYER”. when you’re in the lower layer node it’s revealing the results of the animations processing from the layer below it.

Hi! thanks for the answer.

The transition to self i already tried it, it doesnt work.

with regards to the lower layer, i think it’s the best idea. i’m gonna make some changes so i can still have it generic animations on the skill, but it should work way better that way.