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.
 
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.
 
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().
 
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.
 
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?
 
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.
 
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.
 
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:

 
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?
 
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.
 
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!
 
i think the problem is caused by the reset event.
 

Attachments

  • bug1.png
    bug1.png
    40.2 KB · Views: 21
  • bug2.png
    bug2.png
    48.5 KB · Views: 19
  • bug3.png
    bug3.png
    11.7 KB · Views: 19
What state is the animator getting stuck in? Also, what does your Animator Audio State set look like?
 
i sometimes stuck in stateindex = 2, substateindex = 0
 

Attachments

  • body attack.png
    body attack.png
    346.7 KB · Views: 13
It doesn't look like the animator is active in that screenshot. You're adding the body attack, correct? In this video I describe how to add the body item type, along with combos:

 
I'm facing a simmilar problem with multiple weapons and setups. I went back to the demo scene with the initial demo setup, and noticed the same issue with the default demo sword.

Sometimes the animator gets stuck in attack state, it seems to happen when continuously atacking while moving:
1596816285896.png

I've tripple checked and all the states are set, all the transitions are there. Any idea of how to fix this issue?
 
I just tried to reproduce it getting stuck in the demo scene but wasn't able to. Have you seen if you can repro it in a fresh project? If so @Sarah will have it fixed in the next update.

Based on your screenshot it looks like the animator is waiting on the Slot0ItemStateIndex to change to 3.
 
I've noticed that I edited the demo sword to use a character attribute (Energy), and it seems the animation only gets stuck when there is not enough Energy to perform the attack.

1596834097632.png
After resetting the CaracterUseAttribute, the animation no longer gets stuck.


So I might need to take a look how and when attributes are being checked / used.
 
Top