Sound
Playing a clip from a blueprint, the handle every later node needs to reach it again, and the music of the page a blueprint runs on.
Nine nodes for the interface sounds a blueprint decides: a sound that depends on a condition, such as a click that plays only once a CG is unlocked, a sound that is not tied to a hover or a click, such as an ambience a Page plays while it is open, and a page's music that changes while the page is open, such as the track pressed in a music room. A hover or click sound that always plays needs no blueprint. Set it on the element in Properties, under Sound. A page's own music is set in its Properties too, under Music. The music and effects a story plays belong to the story and are written as /bgm and /sound rows there.
Conventions
- Every one of them is latent. None can back a Blueprint Value, and none is offered to a Story Action blueprint, which has no game host.
Play Soundhands back a handle, andStop Sound,Pause Sound,Resume Sound,Seek Sound,Set Sound VolumeandIs Sound Playingtake it. The handle names the playing clip, not the asset: start the same clip twice and you have two handles that stop, seek and fade independently.- The clip is chosen on the card. On
Play SoundandPlay Page Music,Audio Clippicks the asset andTrackpicks the audio track it plays on, so the player's volume for that track applies. TheAsset Idpin is for the case where the clip is decided at run time. The name it receives has to be one the project holds: picked in an asset picker, or read from a variable or list row that holds one. A name put together at run time, withConcatfor example, is reported by theblueprint/assembled-asset-nameproject check and refused by a production build, because the game package does not carry that clip. - The page music nodes set the music of their own page.
Play Page MusicandStop Page Musictake no handle. They change the music of the page, or the layer, whose blueprint runs them, for as long as it is open, in place of the page's Music setting, and the rules of that setting apply: going back to a page underneath brings that page's music back, and a page that replaces it throughReplace Pageand keeps the current music goes on playing it. While a game is running the story decides the music, so they change nothing, and in Dev Mode a warning in the Console panel says so.
Play Sound
blueprint.sound.play · Latent
Starts a clip and returns the handle that reaches it afterwards.
| Pin | Direction | Type | Notes |
|---|---|---|---|
in | in · exec | — | |
assetId | in · data | string | Optional. Overrides the card's Audio Clip, for a clip chosen at run time. |
loop | in · data | boolean | Optional, literal. |
volume | in · data | float | Optional, literal. |
fadeIn | in · data | float | Optional, literal. Seconds. |
next | out · exec | — | |
handle | out · data | SoundHandle | What every other node in this category takes. |
On-card fields
| Field | What |
|---|---|
Audio Clip | The audio asset to play. |
Track | The project audio track it plays on, so the player's volume for that track applies. |
Stop Sound
blueprint.sound.stop · Latent
| Pin | Direction | Type | Notes |
|---|---|---|---|
in | in · exec | — | |
handle | in · data | SoundHandle | Optional. Unwired, it stops every clip Play Sound started. |
fade | in · data | float | Optional, literal. Seconds. |
next | out · exec | — |
Pause Sound
blueprint.sound.pause · Latent
| Pin | Direction | Type | Notes |
|---|---|---|---|
in | in · exec | — | |
handle | in · data | SoundHandle | |
next | out · exec | — |
Resume Sound
blueprint.sound.resume · Latent
| Pin | Direction | Type | Notes |
|---|---|---|---|
in | in · exec | — | |
handle | in · data | SoundHandle | |
next | out · exec | — |
Seek Sound
blueprint.sound.seek · Latent
| Pin | Direction | Type | Notes |
|---|---|---|---|
in | in · exec | — | |
handle | in · data | SoundHandle | |
time | in · data | float | Literal. Seconds from the start of the clip. |
next | out · exec | — |
Set Sound Volume
blueprint.sound.setVolume · Latent
| Pin | Direction | Type | Notes |
|---|---|---|---|
in | in · exec | — | |
handle | in · data | SoundHandle | |
volume | in · data | float | Optional, literal. |
fade | in · data | float | Optional, literal. Seconds — this is how a clip is ducked under a line rather than cut. |
next | out · exec | — |
Is Sound Playing
blueprint.sound.isPlaying · Latent
| Pin | Direction | Type | Notes |
|---|---|---|---|
in | in · exec | — | |
handle | in · data | SoundHandle | |
next | out · exec | — | |
isPlaying | out · data | boolean |
Play Page Music
blueprint.sound.playPageMusic · Latent
Makes a clip the music of the page this blueprint runs on, for as long as the page is open. When the same music is already playing on the same track, it carries on without a break, at this node's volume. Otherwise the music playing fades out over its own fade, and this clip fades in over fade. Running the node again on the same page replaces the music it set. While a game is running, it changes nothing.
A music room plays its rows with it: a row pressed takes over from the row pressed before it, and leaving the page brings back the music of the page underneath. The Music list on the Extra page of the Skeleton template (template 1.20.7 and later) is built this way.
| Pin | Direction | Type | Notes |
|---|---|---|---|
in | in · exec | — | |
assetId | in · data | string | Optional. Overrides the card's Audio Clip, such as with the clip of the row pressed. |
volume | in · data | float | Optional, literal. From 0 to 1. Without a value, 1. |
loop | in · data | boolean | Optional, literal. Without a value, the track's own setting. The Music track loops. |
fade | in · data | float | Optional, literal. Seconds. The clip fades in over it, and fades out over it when other music takes over. Without a value, 0. |
next | out · exec | — |
On-card fields
| Field | What |
|---|---|
Audio Clip | The audio asset to play. |
Track | The project audio track it plays on, so the player's volume for that track applies. Empty means the Music track. |
Stop Page Music
blueprint.sound.stopPageMusic · Latent
Plays no music on the page this blueprint runs on, for as long as the page is open, as No music under the page's Music does. The music playing fades out over fade. While a game is running, it changes nothing.
| Pin | Direction | Type | Notes |
|---|---|---|---|
in | in · exec | — | |
fade | in · data | float | Optional, literal. Seconds. Without a value, the music playing fades out over its own fade. |
next | out · exec | — |