(ItemStateIndexChange Sticking) From State Reset

Eyeshock

Member
Hello,

I'm so close. I'M SO CLOSE to perfecting the attack combos so I can actually move on to make the actual game.

So the problem is the State system keeps getting stuck.

The general idea I have in mind is:

Use 1st State (Attack) -> Use Complete -> 0.25 combo window -> Use Next State (Attack) -> Use Complete -> Miss 0.25 combo window -> Reset to State 2

Ok. So I have events in the animator for both onUse and onUseComplete, a 0.25 reset delay, and a brand new animator. I'm also locking the locomotion in the state system via the States, but I don't think that is related to the new animator.

If I attack PERFECTLY (landing my attacks within the 0.25 combo window AFTER the onUse and before the UseComplete), it works fine. The problem is if I spam the attack button, or miss the window, or just randomly sometimes it seems like its getting stuck. The IndexStateItemChange trigger doesn't activate and I am stuck in Use (active) forever because the animation never fires.

You can see the screenshots for my settings.

I'm not even going to try and deal with the reset state thing. I figure that's via expanding on the AnimatorAudioState or adding a new AnimationEvent.

Some considerations:
1) Is the Reset Delay in the state system starting when you hit the Use Input button or when the AnimationEvent fires for OnIemUse?
2) It doesn't seem to matter if I have WaitForCompletionEvent on or off. The animators have these events, but the Use(ability) sticks without the trigger fire regardless.

Thanks for your continued support.
 

Attachments

  • meleestuck1.PNG
    meleestuck1.PNG
    51.8 KB · Views: 9
  • meleestuck2.PNG
    meleestuck2.PNG
    811.6 KB · Views: 9
Following up; I dropped it down to 1 attack and muted the combo routes. It still locks up, and despite Use (activte) in abilities, the Item State index shows 0 in the parameters. Weird.

Also following up: I was referencing this thread:

So I rebuilt it from scratch, starting with 1 attack animation and then moving up to 3. Everything is working, but the moment I set the ResetDelay to 0.10 from -1, the attack animation would get stuck mid combo.

Same issue; Use Ability is locked Active, but ItemStateIndexChange trigger isn't firing and lose all control.
 

Attachments

  • meleestuck3.PNG
    meleestuck3.PNG
    799.4 KB · Views: 5
Last edited:
Recreated the issue in demo by changing the reset delay to 0.25.

I'm probably being dumb though; so I'm guessing that the reset doesn't trigger the ItemStateIndexChange, and I'm definitely mimicking the transitions in the demo animator.
 

Attachments

  • meleestuck4.PNG
    meleestuck4.PNG
    595.7 KB · Views: 7
We've been looking into this and we actually don't think the reset delay is useful so we are talking about getting rid of it. Did you have a particular use case for it? Right now if you attack the reset delay keeps the attack in the active substate for that duration until you attack again.

This would be why it keeps getting stuck since the ItemStateIndexChange is enabled for it to transition to a new attack and that wouldn't be triggering since the substate is already specified.

I think one way to get around it would be to edit the exit transitions on your attack animations. Right now on the demo controller they are set to ItenStateIndex not equal to 2 to exit, but you could change that to also include the substate so add ItemSubstateIndex not equal to "x".

But we are really just debating if that parameter is necessary so let me know how you are using it that would be really helpful! Thanks!
 
Hey I just googled upon this thread looking for an answer to a similar problem.

First to answer @Sarah 's question asking if the Reset Delay is useful. I use this delay, the "StopUseAbilityDelay" on the shootable weapon properties component to hold the aiming pose for about a half second after shooting and not actually using the Aim ability. I use this to allow the player to rapidly fire without actually using the aim ability, I guess "hip firing" would be the phrase. This prevents the character from immediately going back into the Idle position which makes rapidly firing without using Aim very clunky, as between every shot the character puts his arms down which causes the guns to go down to idle and when you're shooting fast the bullets go everywhere and the character looks like they're just flailing around from idle to shoot.

I hope this is the same delay your are talking about, if it's not then oh well, I typed lots for no reason.

Second, my problem is that I am activating a state from script and when the state changes the character gets stuck in the aim animation (while using the USE ability, NOT the AIM ability) and the Slot0ItemStateIndex is stuck at 0. I'm thinking the state change happens before the delay is up and the Use event doesn't get completed.

Is there a way to automatically complete the event for the state change, without changing the parameter for either state?
 
Top