Skip to content

API Sounds

Alexandre 'kidev' Poumaroux edited this page Oct 21, 2026 · 4 revisions

Sounds

Import from proleak import sfx

Play sounds on this client only.

Functions

Returns Function
list[str] names() The UI sound names of the player's sound set, sorted; empty until the game has loaded them.
None play_ui(name: str) A UI sound by its name.
None announce(name: str) A UI sound by its name, on the announcer's channel.
None play_global(path: str) A sound file path from the game's sound bank, heard everywhere.
None play_at(path: str, x: float, z: float) A sound at map point (x, z).
None play_from(path: str, unit: Unit | int) A sound coming from unit (an id or a Unit), following it.
None what(unit: Unit | int) The line unit (an id or a Unit) says when the player selects it.

Detailed description

UI sounds have names (see names): "goodjob", "round-start", "reached-king", "click". Other game sounds are paths in the game's sound bank, such as "Sounds/Music/Menu".

Function documentation

names

names() -> list[str]

The UI sound names of the player's sound set, sorted; empty until the game has loaded them.

play_ui

play_ui(name: str) -> None

A UI sound by its name.

announce

announce(name: str) -> None

A UI sound by its name, on the announcer's channel.

play_global

play_global(path: str) -> None

A sound file path from the game's sound bank, heard everywhere.

play_at

play_at(path: str, x: float, z: float) -> None

A sound at map point (x, z).

play_from

play_from(path: str, unit: Unit | int) -> None

A sound coming from unit (an id or a Unit), following it.

what

what(unit: Unit | int) -> None

The line unit (an id or a Unit) says when the player selects it.


Previous: Server kinds | Next: Timers

Clone this wiki locally