NarraLeaf

Sound

Playing a clip from a blueprint, and the handle every later node needs to reach it again.

Seven 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, and a sound that is not tied to a hover or a click, such as an ambience a Page plays while it is open. A hover or click sound that always plays needs no blueprint. Set it on the element in Properties, under Sound. 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 Sound hands back a handle, and the other six take 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. Audio Clip picks the asset and Track picks the audio track it plays on, so the player's volume for that track applies. The Asset Id pin 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, with Concat for example, is reported by the blueprint/assembled-asset-name project check and refused by a production build, because the game package does not carry that clip.

Play Sound

blueprint.sound.play · Latent

Starts a clip and returns the handle that reaches it afterwards.

PinDirectionTypeNotes
inin · exec—
assetIdin · datastringOptional. Overrides the card's Audio Clip, for a clip chosen at run time.
loopin · databooleanOptional, literal.
volumein · datafloatOptional, literal.
fadeInin · datafloatOptional, literal. Seconds.
nextout · exec—
handleout · dataSoundHandleWhat every other node in this category takes.

On-card fields

FieldWhat
Audio ClipThe audio asset to play.
TrackThe project audio track it plays on, so the player's volume for that track applies.

Stop Sound

blueprint.sound.stop · Latent

PinDirectionTypeNotes
inin · exec—
handlein · dataSoundHandleOptional. Unwired, it stops every clip Play Sound started.
fadein · datafloatOptional, literal. Seconds.
nextout · exec—

Pause Sound

blueprint.sound.pause · Latent

PinDirectionTypeNotes
inin · exec—
handlein · dataSoundHandle
nextout · exec—

Resume Sound

blueprint.sound.resume · Latent

PinDirectionTypeNotes
inin · exec—
handlein · dataSoundHandle
nextout · exec—

Seek Sound

blueprint.sound.seek · Latent

PinDirectionTypeNotes
inin · exec—
handlein · dataSoundHandle
timein · datafloatLiteral. Seconds from the start of the clip.
nextout · exec—

Set Sound Volume

blueprint.sound.setVolume · Latent

PinDirectionTypeNotes
inin · exec—
handlein · dataSoundHandle
volumein · datafloatOptional, literal.
fadein · datafloatOptional, literal. Seconds — this is how a clip is ducked under a line rather than cut.
nextout · exec—

Is Sound Playing

blueprint.sound.isPlaying · Latent

PinDirectionTypeNotes
inin · exec—
handlein · dataSoundHandle
nextout · exec—
isPlayingout · databoolean

On this page