Animation
Lives in: story animate / stop_animate · optional animations/presets.json
Tweens (or steps) a property on something already on stage. Show/hide fades are a different system — Transitions. Character flipbooks live in the pack — Motion and frames.
Most stories
{
"type": "animate",
"target": "char:left",
"property": "position_x",
"to": 20,
"duration": 0.3,
"relative": true
}
{ "type": "animate", "preset": "shake", "intensity": 8, "duration": 0.5 }
{ "type": "animate", "preset": "bob", "target": "sprite:fairy", "distance": 8 }
{ "type": "stop_animate", "target": "char:left" }
{ "type": "stop_animate", "all": true }
Built-in presets: shake, pulse, flash, bob. Author presets: files under animations/presets.json (locale overlays allowed).
Targets
| Target | What it drives |
|---|---|
bg | Background plate |
char:<place> | Character in that place (left, center, …) |
sprite:<id> / obj:<instance_id> | Stage prop |
panel | Dialogue panel |
screen_shader | Full-screen shader rect |
choice_item:… / ui_button:… / cursor | UI / cursor |
Common properties: opacity, position_x / position_y, scale, modulate, shader:<uniform>. Give an id when you need a precise stop_animate.
Do not animate opacity on a surface while a transition is also fading that surface.
Usually you need
| Want | Do |
|---|---|
| Nudge a character | animate on char:… + position_x / y |
| Hit feedback | "preset": "shake" |
| Soft idle on a sprite | "preset": "bob" |
| Stop | stop_animate on the target (or "all": true) |
Full map
animations/presets.json map · Animation presets · animate