character's animator stuck while doing combo attack

adylop

New member
1581644454870.png1581644482561.png1581644521681.png
Hello,
my character sometimes gets stuck while doing combo attack. The use ability is active when getting stuck.
the use event complete (wait for animation event) seems to cause the issue. if I uncheck the use event complete, the combo attack will still get stuck but recover itself.
can anyone explain what causes the issue?
Thanks.
 

Justin

Administrator
Staff member
Are you using the built in animations or your own? If you are using your own animations you'll need to make sure you've added the appropriate events:


Based on the parameters it looks like it is trying to transition (Slot0ItemStateIndexChange) but my guess is that there isn't a transition which matches those parameters.
 

adylop

New member
yeah it tried to transition to substate index 0 which does not exist.. I did add the corret animation events already. it does not happen often and my further investigation revealed that the m_usecompleted in Use ability is set to false which causes the ability cant not be stopped in canstopability().
 

Justin

Administrator
Staff member
It doesn't look like it will transition to substate 0 when the use ability is active - you have substates 2, 3, and 4 setup. If the UseComplete variable is set to false then the UseComplete event isn't being sent.
 

adylop

New member
So i imported the newset ultimate character controller in an empty project. In the Demo scene, after the character picking up the sword, if I set the resetdelay to 0.5f, it will get stuck in Use ability as well...
Can you please test it?
 

Justin

Administrator
Staff member
The animator isn't setup to have the reset delay set to 0.5. By doing this it doesn't transition from Attack 1 to Attack 2 because of the timing that the index is set.

I just realized that in your original post you have three attack states setup - did you add a third attack state to the animator? The demo scene only includes states 2 and 3.
 

adylop

New member
yeah I did add the third attack to the animator.
why is it not set up to be 0.5?
Do i have to write a new selector so when it is in combo, the selector does not reset?
Thanks.
 

Justin

Administrator
Staff member
Reset delay waits to reset the state index, which the current sword animator does not expect. This is why it gets stuck.

You do not need to create a new selector, my guess is that with your third state the transitions are off by one parameter so that is why it is getting stuck. This page explains how the combos work:

 

adylop

New member
1581865361046.pngthis is the set up for my three combo attacks. I did follow the documentations to set up events etc..but it still does not work. Did I miss anything crucial?
 

Justin

Administrator
Staff member
It looks like you are missing a transition from XX to XXX. Beyond that it's tough to say without inspecting each transition during play mode.

When debugging the animator take a look at the state that it gets stuck in and the parameters that are set. The first question to ask yourself is if the parameters are correct. In your situation I'd expect an Item0SubstateIndex of 4. Assuming that is correct you then know that it is transition related, so you should look at the state that it is in and the transitions to see why it's not transitioning to the next state.
 

Sarah

Administrator
Staff member
I am late to this thread but are you trying to cycle between X, XX, and Air as combo attacks? If so what is the XXX animation?

I would check a couple things:
- all animations have the "OnAnimatorItemUse" and "OnAnimatorItemUseComplete" events.
- transitions from Any State to each attack include the Slot0ItemStateIndexChange parameter.
- exit transitions are just when that item isn't equipped any more, so Slot0ItemStateIndex not equal to 0.

If that doesn't work you could send some screenshots of the transitions or include your animator and I could look at it. Hope this helps!
 
Top