AudioSystem
Once defined, each audio ID is automatically registered on startup, making it available for scripting in-game.
If you simply want to play any custom sound, you can use AudioSystem as you normally would for vanilla sounds.
Redscript
GameInstance.GetAudioSystem(game).Play(n"my_custom_audio");
It also accepts any of the usual parameters that AudioSystem
's methods support.
Currently all these methods are supported:
- Play
- Stop
- Switch
- Parameter: see Parameters
Support for PlayOnEmitter since there's no way to associate a tag_name
when called from vanilla.
Likewise, the methods above can only be used to play sounds on tracks, not on spatial emitters.