Skip to content
ASArcaneMP Scripting APIScripting reference
Global objectClient APIGenerated

Audio

const Audio: object

Defined in: client/api.d.ts:353

Local Wwise playback. Sounds are named game events (see Audio.playSoundAt on the server for the replicated form); a bank that isn’t resident makes the post silently return 0.

readonly dialoguePolicy: DialoguePolicy

The server’s Audio.setDialoguePolicy, as this client applies it.

bankFor(event): string

The soundbank this event needs loaded, from the cooked assets’ own RequiredBank.

string

Wwise event name.

string

The bank name, or “” for an unknown event.

clearMusic(event): boolean

Pops a track off the music stack, starting whatever was under it. It cannot restore state-driven score, and the name stays blocked for the session.

string

The event name passed to setMusic.

boolean

isBankLoaded(bank): boolean

Whether THIS client loaded that bank. The game streams its own banks with the area and reports nothing, so false does not mean an event cannot play.

string

Soundbank name.

boolean

loadBank(bank): boolean

Loads a soundbank so its events can be posted. Custom banks are read from Phoenix/Content/WwiseAudio/Windows/.

string

Soundbank name without the .bnk extension.

boolean

True when the call reached the engine; the engine itself reports no result.

playSound(event, options?): number

Posts an event on the local pawn, i.e. at the listener (no distance falloff).

string

Wwise event name.

duration = seconds until it ends itself; stopEvent = terminator override (auto-resolved from the game data when omitted); autoStop = false disables that lookup.

boolean

number

string

number

AkPlayingID, or 0 when the post was refused.

playSoundAt(event, x, y?, z?, options?): number

Posts a spatialized one-shot at a world position.

string

Wwise event name, e.g. “cabbage_explosion” (case-insensitive).

number | Vector3Like

World-space X coordinate.

number

World-space Y coordinate.

number

World-space Z coordinate.

duration = seconds until it ends itself; stopEvent = terminator override (auto-resolved from the game data when omitted); autoStop = false disables that lookup.

boolean

number

string

number

AkPlayingID for stopSound, or 0 when the post was refused.

setMusic(event, priority?): boolean

Pushes a track onto the game’s music priority stack. Only events that actually contain a Play action work — most “music” event names only flip Wwise states.

string

Music event name (must be unique while pushed).

number

Stack priority, clamped to -5..5 (default 5 = above the game’s score).

boolean

setRTPC(name, value): boolean

Sets a global Wwise real-time parameter.

string

Wwise RTPC name.

number

New value.

boolean

setState(group, state): boolean

Sets a global Wwise state.

string

Wwise state group.

string

State within the group.

boolean

stopAll(): boolean

Stops every sound in the engine, including the game’s own music and ambience (those mostly re-post on their own). A last resort.

boolean

stopEventFor(event): string

The terminator that would be posted for this event, derived from the game’s own soundbanks.

string

Wwise event name.

string

The stop event’s name, or “” when the event is a one-shot that needs none.

stopOnSelf(): boolean

Stops every sound posted on the local pawn — where playSound puts them. The way out of a held/looping event whose id you no longer have.

boolean

stopSound(playingId): boolean

Stops one playing sound, posting its registered stopEvent first when it has one.

number

An id returned by playSound/playSoundAt.

boolean

unloadBank(bank): boolean

Unloads a soundbank.

string

Soundbank name.

boolean