> For the complete documentation index, see [llms.txt](https://morningheartgames.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://morningheartgames.gitbook.io/docs/gameplay-ability-toolkit/integrations/game-creator/animation-and-combat.md).

# Animation And Combat

This page explains the retained animation and combat surfaces: GAT montages, recipe melee markers, hitbox windows, movement, projectiles, channeling, and targeting.

## Montage Backend

Game Creator abilities use GAT `AnimationMontage` assets. The bridge provides a Game Creator-aware animation driver so a Game Creator `Character` can play montages through the same GAT montage runtime used elsewhere.

Key runtime pieces:

| Piece                         | Role                                                                            |
| ----------------------------- | ------------------------------------------------------------------------------- |
| `GameCreatorAnimationDriver`  | Routes montage playback through a Game Creator `Character` when available.      |
| `GameCreatorMontageBootstrap` | Registers the Game Creator montage driver.                                      |
| `RunMontage`                  | Game Creator Visual Scripting runner for a GAT `AnimationMontage`.              |
| `RunnerMontage`               | Runtime runner instance used by `RunMontage`.                                   |
| `MontagePlayer`               | GAT playback component used by ability recipes and manual montage instructions. |

![Montage track timeline.](/files/TPbR14fVzZl02VG1MbIr)

## Melee Recipe Timing

`Melee` execution mode uses swing montages and named markers for timing. Users author timing in the montage, not with separate fixed duration fields.

| Marker        | Required | Meaning                        |
| ------------- | -------- | ------------------------------ |
| `Hit Start`   | Yes      | Opens the hitbox window.       |
| `Hit End`     | Yes      | Closes the hitbox window.      |
| `Combo Start` | Optional | Opens the combo input window.  |
| `Combo End`   | Optional | Closes the combo input window. |

Marker matching ignores spaces, dots, underscores, and case. For example, `MeleeHitStart`, `Hit_Start`, and `hit start` all normalize to `Hit Start`.

If a swing montage is missing `Hit Start` or `Hit End`, the melee ability cancels and logs a warning. This keeps combat timing tied to authored animation.

## Hitbox Lifecycle

The hitbox surface is retained as a generic GAT/Game Creator ability tool.

| Tool                             | Role                                                                                                                                       |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `GameCreatorAbilityWeaponHitbox` | Reusable component that opens a timed hit window, polls for targets, applies configured effects, records hit context, and relays `On Hit`. |
| `Apply Hit Shape`                | One-shot trace shape collection and effect application.                                                                                    |
| `Open Weapon Hitbox Window`      | Opens a reusable hitbox window from Visual Scripting.                                                                                      |
| `Poll Weapon Hitbox Window`      | Polls the currently open window immediately for deterministic timing.                                                                      |
| `Close Weapon Hitbox Window`     | Closes the current window and clears relay state.                                                                                          |

Hit results are stored in the current ability context so later instructions can read hit targets, count hits, apply additional effects, trigger cues, or branch behavior.

## Movement And Dodge Recipes

`Movement` execution mode is used for dodge, dash, and short movement skills.

Recipe fields:

* duration;
* speed;
* movement curve;
* optional self effects;
* optional montage from the `Cast` style montage module when the ability uses animation.

When the owner is a Game Creator `Character`, movement uses the character driver. Plain actors fall back to transform movement.

## Projectiles

Projectile recipes support:

| Mode      | Use                                                                                                                   |
| --------- | --------------------------------------------------------------------------------------------------------------------- |
| `Linear`  | Firebolt-style forward projectiles with speed, radius, lifetime, spawn offsets, impact VFX, cue, and impact effects.  |
| `Falling` | Meteor-style delayed impact from a target point, with fall height, fall time, radius, impact cue, and impact effects. |

The projectile lifecycle stores projectile object, target actor, target point, impact point, impact target, and hit targets in context.

Use `TargetedProjectile` when a skill should confirm a target before casting or impact. Use `Projectile` when the skill can cast and launch immediately.

## Channeling

`Channel` execution mode handles hold-to-cast skills:

* resource tick effect;
* repeated tick effects;
* tick interval;
* forward box shape;
* muzzle offsets;
* cue tag;
* end on release.

The runtime can trigger a while-active cue, apply tick costs, collect targets, apply tick effects, and stop when input release arrives or resources fail.

## Targeting

Targeting uses GAT `TargetCollector` prefabs and stores the active session in current ability context.

![Target collector filtering and indicator authoring.](/files/3qHsv2CFi8V1tAKfb1RC)

Common setup:

1. Enable `Target` on a `TargetedProjectile` recipe.
2. Assign a target collector prefab.
3. Keep the targeting tag, such as `State.Targeting`, enabled while selection is active.
4. Confirm or cancel from Game Creator input triggers.
5. Read target actor or target point from context in later recipe events.

Keep targeting state observable through context getters rather than exposing collector internals as the normal workflow.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://morningheartgames.gitbook.io/docs/gameplay-ability-toolkit/integrations/game-creator/animation-and-combat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
