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 <noreply@anthropic.com>
adminandClaude Opus 5.5 committed 2026-10-12 21:55:38 +02:00
1 parent 233400dda0
commit a4de2a9bbc
1 file changed
+5 -1
+5 -1
@@ -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`,