Attack Sequencing Very Strange Behavior - UCC /w UIS Integration

Eyeshock

Member
So I've been working on this for a while. I had originally tried to use a Reset Audio Substate option, but in another forum thread, it was advised I don't bother using that option.

Ultimately my goal is very simple:
Use Ability
Short Window to Request Ability (maybe right after UseItemComplete)
Move To Next Attack, Repeat Last Step
End Ability If Window is missed

Some really strange issues I'm noticing:

1) Whether I set my Melee Weapon On Use duration to 1, 5, or 200: the state index sets to the Use state immediately.

2) This behavior seems true with WaitForAnimation Event for OnUse too.

* So if it's not an indicator for setting the Slot0ItemStateIndex to the Use value, then what exactly is OnUse doing?

3) The AbilityIndex on an ItemAbility doesn't seem to do anything. So why is the field there? It's not updating the animator's AbilityIndex.

4) OnItemUseComplete seems to clear the ItemIndex to 0 even when the box for WaitForEvent isn't checked.

5) Removing the animation event: Slot0StateIndex never resets from 2, regardless of duration.


6) So when I try reducing it to a single attack animation using the StateIndexChange as a trigger to the attack node, this happens:
Queue Ability
Ability is Requeued before Ability Ends
Ability State Didn't Change, so Animator is Frozen Now.

Edit: what appears to happen via debug statements:

Ability Is In Use
Attack Item Ability Used
OnItemUse Animation Event
Attack Item Ability Used
OnItemUse Animation Event
OnItemUseComplete Event
OnItemUseComplete Event
---> But the Slot0ItemStateIndex is still set to #2


Because I was allowed to Requeue the ability before it ended....

So my questions are these:
1) What EXACTLY does the OnUse Event actually do considering something has to set the Index to the ItemUseIndex state in order to even get to the OnUse animation event.

2) Why are the OnItemUse and OnItemUseCompletes having NO effect on the Use Ability or its inheritance?

3) When exactly in the chain does the ability allows itself to be re-queued, and how can I prevent the USE ability from being re-activated while it is already active? Disregard this: just found the Attack Combos boolean
*** But please note: this isn't getting cleared by Duration right now: only Complete animation events

NOTE: I'm using the UIS Integration for UCC.
 
Last edited:
I managed to accomplish this by adding another trigger for each time the Ability was successfully called again (provided there were usable items in m_usable.

However, some of the buggy behavior above still seems to be present. Like the duration ignorance for Melee script. Also, in some cases the OnItemUse animation would call immediately on an animation regardless of where the event actually was. The fix was to remove the animation from the mecanim state, jiggle the event location and reapply to the state.

Also a question: how can I give an Ability (like Damage Visualization) the ability to end the UseItem ability? Since it's not in the same hierarchy. It's easy in the Mecanim, but if the damage happens before the ItemUseComplete event, the UseItem ability and the Slot0indexState get stuck to their use states.
 
Last edited:
The OnUse event will trigger when the melee weapon can use the item. The Item State Index will be set immediately, but the Substate Index will be set according to the values specified for the Use Animator Audio State Set. Have you seen this page under combos? It gives a pretty good example of how the Use/UseComplete callbacks work:


Also a question: how can I give an Ability (like Damage Visualization) the ability to end the UseItem ability? Since it's not in the same hierarchy. It's easy in the Mecanim, but if the damage happens before the ItemUseComplete event, the UseItem ability and the Slot0indexState get stuck to their use states.
You could subclass the ability and call Controller.TryStopAbility to stop that ability.
 
Thank you for the reply.

I'm not using the Animator Audio State Set. I tried to use it numerous times, but ultimately just replaced it with a trigger. I mentioned it and the reset feature in another and simply came to the conclusion the reset was unpredictable and the Audio State Set wouldn't work well for combo variety.

TryStopAbility isn't quite working. I call it when the OnAbilityStart fires in DamageVisualization subclass, but if I push input before the OnDamageV..End event in the animator, it just starts the ItemAbility again and this freezes (since the StateChange trigger doesn't fire.

Basically I need these three questions answered; the 1st one would probably solve most of my current issues and some future ones I'm dreading:

1) How can I lock out ALL OTHER ABILITIES during a certain ability, specifically lock out ALL Item Abilities from STARTING?

2) Is this a bug: the WaitForDuration on Melee weapon for Use/End use events doesn't seem to work at all. It seems completely dependent on AnimatorEvents in the UIS integration.

3) Is this a bug: Ability field on the ItemAbility doesn't change the AbilityIndex in animator parameters.
 
1. You can override ShouldBlockAbilityStart within the ability to stop other abilities from starting.

2. If the animation event is sent before the duration then that animation event will take hold. In the next update I'll prevent animation events from triggering it if you don't have the animation event enabled.

3. No, Item Abilities cannot change the AbilityIndex.
 
Top