recorder
Controls the Kreedz movement recorder: start, stop, discard and query takes.
Functions
recorder.is_recording
recorder.is_recording() -> booleantrue while a take records.
recorder.is_playing
recorder.is_playing() -> booleantrue while a run plays back.
recorder.start
recorder.start([name]) -> true | false, reason| Name | Type | Description |
|---|---|---|
| nameoptional | string | Run name for the take. Default next free "run N". |
Starts recording a take as a new run.
Returns true, or false plus reason
- Reasons: "playing", "moving", "stamina", "unavailable".
- While already recording, returns true and ignores name.
recorder.stop
recorder.stop() -> string | nilStops and saves the take.
Returns saved run name; nil if idle
recorder.discard
recorder.discard() -> booleanStops the take without saving.
Returns true if a take was dropped
recorder.info
recorder.info() -> tableRecorder state snapshot.
Returns table (see fields)
Fields
recorder.info() table
| Name | Type | Description |
|---|---|---|
| recording | boolean | |
| playing | boolean | |
| run | string | Active run name. |
| frames | integer | Frames in the active run or take. |
| seconds | number | Length of the active run or take. |