Melee combo reset delay prerequisites?

zoicelols

Member
I was wondering what is required in order to make this work for spamming Use. I set the reset delay to 1 and it freezes the character on the first attack animation state when I spam it. If I wait fractions of a second each time before pressing, it works.

The use ability gets stuck active.

These are the results I get with spamming and getting stuck.

1551327517752.png
 
There is likely something else that is blocking the animation - can you describe how I can reproduce the issue within the demo scene so I can take a closer look?
 
The only things that I changed in the demo scene was the idle animation in the third person controller animator and the reset delay to 1. Also the order of the scripts on the character. I moved the character locomotion and animator monitor towards the top so I wouldn't have to keep scrolling to add abilities, edit and test them over and over. I'm not sure if that gives the higher ones priority or how that works, but that is all the changes I made.

These are the results I get from spamming and getting instantly stuck in the demo like what happened in my own scene while using the body item.

Again the use ability gets stuck and the first attack animation is where it gets stuck.

Although just like my own scene if I take my time pressing the button instead of spamming, it works as intended.

1551395031568.png

1551395157677.png
 
Last edited:
There are a couple of things going on here. First, the Selector is resetting too quickly so I changed the following within Sequence.StartStopStateSelection:

Code:
if (start && m_ResetDelay != -1 && m_EndTime + m_ResetDelay < Time.time) {
to:
Code:
if (start && m_ResetDelay != -1 && m_EndTime != -1 && m_EndTime + m_ResetDelay < Time.time) {

From there the selector won't be reset too quickly. The second part is that the animator is designed to always go from Punch 1 -> Punch 2 -> Punch 1, so there isn't a transition that allows for Punch 1 -> Punch 1. You'll need to adjust the animator to account for this.
 
Top