API ReferenceGE Extensionsflowgraphnodesaudio
Play Sound (Flowgraph Node)
- **Node Name:** `Play Sound`
Overview
- Node Name:
Play Sound - Icon:
audiotrack - Category:
dynamic_p_duration - Dynamic Mode:
repeat - Tags:
sound,audio,volume - File:
extensions/flowgraph/nodes/audio/playOnce.lua
Plays an audio sample once or repeatedly.
Pin Schema
Input Pins
| Pin | Type | Default | Description |
|---|---|---|---|
file | string | event:UI_Checkpoint | Source for audio sample (event or file path) |
channel | string | (hidden) | Audio channel to play on |
volume | number | 1 | (Hidden, hardcoded) Volume (0–1) |
pitch | number | 1 | (Hidden, hardcoded) Pitch multiplier |
fadeInTime | number | -1 | (Hidden, hardcoded) Fade in time |
fadeOutTime | number | -1 | (Hidden, hardcoded) Fade out time |
unique | bool | false | (Hidden, hardcoded) Unique sound flag |
Legacy Pin Mappings
source→file
Behavior
postInit()- Configures file pin to allow.prefab.jsonfiles. Sets volume pin to a slider gizmo (0–1 float range).workOnce()- CallsplaySound()once on first trigger.work()- Inrepeatdynamic mode, callsplaySound()every frame while active.playSound()- Assembles audio data (volume, pitch, fade times, unique flag, source, channel) and callsEngine.Audio.playOnce(channel, source, data). Defaults channel toAudioGui.
Notes
- Despite the filename
playOnce.lua, the node supportsrepeatmode viadynamicMode. - Default audio channel is
AudioGui, notAudioChannelMaster.
See Also
- Audio Channel Fade (Flowgraph Node) - Related reference
- Audio Fade In (Flowgraph Node) - Related reference
- Audio Fade Out (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide