- Edited
There's currently no way to effectively check if a sound is currently playing or not.
If you try to stop a sound that already stopped, console throws an error about invalid Sound ID.
However you might want to use stop_sound for instances where you need to ensure one sound stops before the script plays another.
If possible, what would be useful is if the play_sound function could automatically null
the local or global property that is optionally provided for the sound_id upon the sound playing fully and reaching file end.
That way, a script could query the state of the local/property first before making a stop request.
if global.property["sound_1"] != null then
stop_sound(global.property["sound_1"]);
else
// the sound already stopped...so do nothing in this case
end;
Not sure if something like that is possible.
If a sound stops on it's own right now, any script that is trying to resolve "skipping sounds" (clicking fast through dialogue with audio for instance) will throw errors if the dialogue plays out normally with the sound just finishing first.
Would be good to find a way to resolve those normal scenarios.