Repository navigation
API Sounds
Alexandre 'kidev' Poumaroux edited this page Oct 21, 2026
·
4 revisions
| Import | from proleak import sfx |
Play sounds on this client only.
| 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. |
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".
names() -> list[str]
The UI sound names of the player's sound set, sorted; empty until the game has loaded them.
play_ui(name: str) -> None
A UI sound by its name.
announce(name: str) -> None
A UI sound by its name, on the announcer's channel.
play_global(path: str) -> None
A sound file path from the game's sound bank, heard everywhere.
play_at(path: str, x: float, z: float) -> None
A sound at map point (x, z).
play_from(path: str, unit: Unit | int) -> None
A sound coming from unit (an id or a Unit), following it.
what(unit: Unit | int) -> None
The line unit (an id or a Unit) says when the player selects it.
Using ProLeak
Features
Tutorial
- Your first plugin
- Plugin basics
- Handling events
- Plugin settings
- User interface
- Players, units and game data
- Purchases, signals and pings
- Chat, camera, input and more
- Game assets
- Game modes
- Game updates
- Publishing plugins
Reference