Play Sound
Play Sound
- Group
- Audio
- In the node menu
- Audio › Play Sound
- Where it can be used
- Scheme graphs
- Tags
What it does
Section titled “What it does”Play Sound plays one audio clip, once. Audience decides who hears it. The flow goes on through Out at once, or only when the clip has ended, if Wait Until Finished is on.
The sound belongs to the scheme. It pauses while the scheme is paused and picks up where it was when the scheme resumes.
Example
Section titled “Example”Play Sound
sfx_outcome_discovered
Only if Conspirator is a player
When to use it
Section titled “When to use it”Use it for a sting at a turning point: a bell, a fanfare, a door slamming. Set Audience to Only If Player Is with the Conspirator, and a scheme that a character runs on its own stays quiet.
Use Play Music instead for a track that should go on and loop under the scene. Use Show Dialogue with sounds of its own when the sound belongs to one window.
Good to know
Section titled “Good to know”- With no clip, the node only goes on, and the card warns about it.
- With Only If Player Is and an actor that is not a player, or not available, nothing plays and the flow goes on.
- With Wait Until Finished on, the card adds the line “Waits until it ends”. A paused scheme pauses the clip, and so the wait.
- A game saved while a sound is being waited for runs the node again after the load.
- The sound does not change the story. It is for the player’s ears only.
Settings
Section titled “Settings”| Label | Draft key | Type | Default | Shown if, tooltip and notes |
|---|---|---|---|---|
| Clip | Clip | asset path (AudioClip) | null (none) | The clip to play. Without a clip the node only continues. |
| Audience | Audience |
| "TakingPart" | Every Player: the sound always plays. Only If Player Is: the sound plays only when the actor below is a player. Players Taking Part: it plays for the conspirator, the target and the accomplices when a player plays them. |
| Player Is | Listener | ActorRef | "Conspirator" | Shown if Audience = OnlyIfPlayerIs The sound plays only when a player plays this actor. When the actor is not available the sound is skipped and the flow continues. |
| Volume | Volume | number | 1 |
|
| Pitch | Pitch | number | 1 |
|
| Priority | Priority | integer | 128 | Audio source priority: 0 is the highest, 256 the lowest.
|
| Mixer | Mixer | asset path (AudioMixerGroup) | null (none) | Mixer group the sound plays through. Empty plays directly. |
| Wait Until Finished | WaitUntilFinished | bool | false | Continue only when the clip has finished playing. Off: continue at once. While the scheme is paused the clip pauses too, and so does the wait. |
Outputs
Section titled “Outputs”- Out
In a draft
Section titled “In a draft”"type""Play Sound""set"keysClip,Audience,Listener,Volume,Pitch,Priority,Mixer,WaitUntilFinished"then"keys"Out"
"<alias>": { "type": "Play Sound", "then": "<alias>"}