From a4de2a9bbc4a1fc7e57cd867a19fb9c4f8d95b08 Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Mon, 12 Oct 2026 21:55:38 +0200 Subject: [PATCH] Behaviors: On start of a new object runs before it is drawn An object that is spawned, made by a composition or switched on the first time hears On start and On enable still in that frame. An animation its On start plays is drawn at frame 0 right away. Co-Authored-By: Claude Opus 5.5 --- Behaviors.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Behaviors.md b/Behaviors.md index d1d8e96..37958d8 100644 --- a/Behaviors.md +++ b/Behaviors.md @@ -652,7 +652,11 @@ the inspector). game stops or restarts; a restart is therefore `On disable` → `On destroy` → (new world) `On start` → `On enable`. An object destroyed during a frame gets no further events of that frame, the two farewell events follow at the end of it; an object destroyed while off gets `On destroy` alone. - Off and on again within one frame is no edge: neither event fires. + Off and on again within one frame is no edge: neither event fires. A behavior that comes to be + during a frame — spawned, made by a composition or switched on the first time — hears + `On start` and `On enable` still in that frame, before it is drawn, and `On update` from the + next. An animation its `On start` plays is drawn at frame 0 right away. Only what such an + `On start` spawns in turn waits for the next frame. - **Event order**: a frame goes event kind by event kind, each across every behavior: `On disable`, `On enable`, `On key down`, `On key up`, `On key held`, `On timer`, `On collision enter`, `On collision stay`, `On collision exit`, `On animation finished`, `On composition finished`,