← All namespaces

audio

Audio Core

Runtime audio playback and mix control in the live world. Sound asset authoring lives under audio.authoring.

What it's for

This namespace drives sound in a live world — a PIE session or the open editor level. It plays one-shot cues and waves, spawns audio components and ambient actors, fades sources in and out, primes assets for low-latency playback, and pushes or pops SoundMix modifiers on the global mix stack. These are runtime operations: they act on the running world and do not change any asset on disk.

Reach for it when you want to hear something happen or to shape the global mix while testing. Fire a UI sound to check a HUD, play a spatialized cue at a location to audition attenuation, attach a looping engine sound to an actor, or push a SoundMix to duck a class of sounds and confirm the balance before you commit it into an asset.

When your goal is to author or edit the sound assets themselves — SoundCues, SoundClasses, SoundMixes, MetaSounds, attenuation settings, dialogue, reverb, or source and submix effects — use audio.authoring instead. The two split cleanly: audio.* exercises audio in the world, audio.authoring.* builds the assets that audio plays back. Earlier builds exposed a few asset-creation verbs here directly; those were removed in favor of the fuller audio.authoring path.

Examples

Play a cue at a spot in the level

Ask for a spatialized one-shot and the agent auditions it at a world position.

You: Play the explosion cue over at the crate stack.

  call("audio.play_sound_at_location", {soundPath:"/Game/Audio/SC_Explosion",
        location:[1200, -450, 90], volume:1.2})
    → {ok:true, componentSpawned:true}

Done. Explosion played at [1200, -450, 90] and cleaned itself up.

Attach a looping sound to an actor

The agent binds an audio component to a moving actor so the sound follows it.

You: Make the drone play its motor loop while it flies.

  call("audio.play_sound_attached", {soundPath:"/Game/Audio/SC_MotorLoop",
        actorName:"BP_Drone_2", attachPointName:"MotorSocket"})
    → {ok:true, attachedTo:"BP_Drone_2"}

Done. Motor loop is attached to BP_Drone_2 and follows it.

Duck the mix with a SoundMix

Push a SoundMix onto the global stack to hear its class adjusters, then pop it when you are finished.

You: Push the low-pass menu mix so I can check the ducking.

  call("audio.push_sound_mix", {mixName:"/Game/Audio/SM_MenuDuck"})
    → {ok:true, active:true}
  call("audio.pop_sound_mix", {mixName:"/Game/Audio/SM_MenuDuck"})
    → {ok:true, active:false}

Done. Pushed SM_MenuDuck, confirmed the duck, then popped it.

← Back to all namespaces