Quote from: Crimson Wizard on Sun 03/09/2023 18:21:38By the way, I think you also need to test if PlayingClip is not null in the above code, in case the channel was assigned, but it does not play anything at the moment.Correct, thanks! I just came to update my previous post to mention this in case someone else wishes to do the same, as my previous code will cause the game to crash if there's no sound playing, due to the null pointer. So one can just check for 'Game.IsAudioPlaying' instead of checking if the Audiochannel is not null, as you previously suggested me to check instead of checking the Audiochannel type.
This works great and does not crash when there's no sound playing, but for my scenario with the different 'audio channels logic' using global variables, I should fix it according to what you just added. Many thanks!