> For the complete documentation index, see [llms.txt](https://malbersanimations.gitbook.io/animal-controller/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malbersanimations.gitbook.io/animal-controller/super-item/super-item-system/super-item-processor-by-animation.md).

# Super Item Processor By Animation

## Overview

A `StateMachineBehaviour` you add to an Animator state. When the animation reaches a given normalized time, it calls back into a named **Action** on a named **Action Set** of whichever matching item the character is holding.

This is how you land an effect on an exact animation frame — the instant a bowstring releases, the moment a gun's slide racks — rather than guessing with a delay.

***

## Requirements

* The behaviour added to an Animator state on the character's controller.
* A `SuperItemManager` on the same GameObject as the Animator. It is found on the first state entry.
* Processors on the target Action flagged **On Animation**, or nothing will happen.

***

## How it works

**On State Enter** it looks up every `Item Type` in its list, finds those currently equipped, and remembers them. With a **Normalized Time** of `0`, the message is sent immediately.

**On State Update** it waits until the animation passes **Normalized Time** — skipping frames while the Animator is in transition — then sends the message once per item.

The message only lands if the item's **active Action Set** matches **Set**, and its currently playing Main or Slave Action matches **Action**. Every processor on that Action flagged `On Animation` then executes.

***

## Properties

#### Items ID

An include/exclude list of `SuperItemID`. Only matching equipped items receive the message.

#### Set

The name of the Action Set the item must have active.

#### Action

The name of the Action inside that set that receives the message.

#### Normalized Time

`0` to `1`. When in the animation to fire. `0` fires on state entry.

#### Preview Item

**Editor only, not saved.** Assign a Super Item (scene object or prefab) and the **Set** and **Action** fields become dropdowns populated from that item, instead of free text.

{% hint style="info" %}
Use the Preview Item. Set and Action are matched by **string**, so a typo fails silently at runtime with nothing in the console. The dropdown is the only thing standing between you and a very quiet bug.

The reference is stored per editor session rather than on the controller asset — an Animator behaviour lives inside the controller and cannot hold a scene reference.
{% endhint %}

***

## Example — a gun that ejects a shell mid-animation

On the fire animation state, add the behaviour with:

* **Items ID**: `Pistol`
* **Set**: `Default`
* **Action**: `Attack`
* **Normalized Time**: `0.4`

On the pistol's `Attack` Action, add a **Unity / GameObject Set Active** or **Reactions List** processor flagged `On Animation`. It fires exactly 40% into the animation, whatever the clip length or playback speed.
