SplitScript reference / Language / onStart
onStart
lifecycle block
onStart { ... }
Reacts after the timer starts.
Runs once when consecutive updates observe the timer leave TimerState.NotRunning. A bare global assigned on every completing path becomes attempt-scoped: it remains live across process detach and is cleared after onReset. The first update establishes a baseline without firing, so loading during an active attempt does not synthesize initialization. Observation happens after settings refresh but before process attachment and state polling, so this action can run while detached. Process providers, attachment-scoped globals, layout, current, and old are unavailable. A start requested by this script is observed on the following update rather than invoking this action directly from the start decision.
Examples
Use onStart
let elapsed
onStart {
elapsed = 0.0
}