API ReferenceGE Extensionsflowgraphnodesrecording
Record Replay (Flowgraph Node)
- **Node Name:** `Record Replay`
Overview
- Node Name:
Record Replay - Category:
repeat_f_duration - File:
extensions/flowgraph/nodes/recording/recordReplay.lua
Records a replay of the current vehicle. Uses the built-in replay system to capture and save vehicle state.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
start | flow (impulse) | Start recording |
stop | flow (impulse) | Stop recording and save to file |
prefix | string | Prefix for the generated filename |
Output Pins
| Pin | Type | Description |
|---|---|---|
filename | string | The generated replay filename |
Internals
self.durationState-'inactive'→'started'→'finished'.onReplayStateChanged(state)- callback that captures the loaded file name when the replay system enters'recording'state.saveFile()- placeholder that generates a filename from the prefix and recording count (currently unused in the work flow).
How It Works
- Starts in
inactivestate. - When
startimpulse fires, callscore_replay.toggleRecording(false)to begin recording. - The
onReplayStateChangedcallback captures the output filename. - When
stopimpulse fires, callscore_replay.toggleRecording(false)again to stop and save. - The
drawMiddlecallback shows the current duration state in the editor.
Lua Code Example
-- Record a vehicle replay:
-- missionStart → recordReplay.start
-- missionEnd → recordReplay.stop
-- recordReplay.filename → playReplay.filename (for playback)Key Dependencies
core_replay- replay system (toggleRecording,getRecordings)
Additional Methods
C:_executionStarted()
Called when graph execution starts. Used for initialization/reset.
C:init()
Initializes the node, setting up pins and default properties.
See Also
- Play Replay (Flowgraph Node) - Related reference
- Record Camera (Flowgraph Node) - Related reference
- Start Auto Replay (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide