Animation Slot Event Trigger

AnimationSlotEventTrigger is a subclass of the AnimationEventTrigger. AnimationSlotEventTriggers are often used with ItemActions to wait for an Animation Event or a constant duration.

When the WaitForAnimationEvent field is enabled the event will only trigger once the Animator sends an aniomation event with the correct name. For consistency the animation name used will always be the relative to the field name.

“OnAnimatorItem”<FieldName>

The “UseEvent” field will wait for the “OnAnimatorItemUse” animation event.
The “UseComplete” field will wait for the “OnAnimatorItemUseComplete” animation event.
This rule isn’t strict. It is simply the name convention we have chosen to use.

The AnimationSlotEventTrigger allows the option to use the SlotID of the Item within the animation event name. If the WaitForSlotEvent option is ticked the animation event name should be

“OnAnimatorItem”<FieldName>”Slot”<SlotID>

An Item in Slot 0 with the “UseEvent” field with the WaitForSlotEvent option ticked will wait for the “OnAnimatorItemUseSlot0” animation event.

The AnimationSlotEventTrigger is registered and unregistered with:

m_UseEvent.RegisterUnregisterEvent(register, eventTarget,"OnAnimatorItemUse",m_CharacterItem.SlotID, HandleItemUseAnimationSlotEvent);

The event can be scheduled with:

m_UseEvent.WaitForEvent(true);

This will start the scheduled call or wait for the animation event.