P
PHL
Guest
No function for audio groups?
I need a way to check if a particular sound ( e.g. scream_sound) belongs to a particular audio group ( e.g. Voices), using code. I know that you put sounds into audio groups using the resource section, but do I always need to go there if I want to check which sounds belong where? A function would help much.
I secondly need a way to check if any sound of a particular audio group is playing. I need not specify the sound's index; I should just know whether any sound of that audio group is playing. I need this so that I can say: if any sound of Group 1 is playing, stop all sounds of Group 2.
Now that GameMaker:Studio 1 lacks these functions, what reckon ye that I can do?
For the first one: I have no idea.
For the second:
Use arrays? I could make an array representing a group, and input sounds as its positions. E.g. voices_group[0]= scream_sound;
voices_group [1]= (another sound); etc.
And if I want to check if any sound is playing, I run a for-loop from 0 to (number of sounds-1).
I'm confused and need help. Or maybe there's no way?
I need a way to check if a particular sound ( e.g. scream_sound) belongs to a particular audio group ( e.g. Voices), using code. I know that you put sounds into audio groups using the resource section, but do I always need to go there if I want to check which sounds belong where? A function would help much.
I secondly need a way to check if any sound of a particular audio group is playing. I need not specify the sound's index; I should just know whether any sound of that audio group is playing. I need this so that I can say: if any sound of Group 1 is playing, stop all sounds of Group 2.
Now that GameMaker:Studio 1 lacks these functions, what reckon ye that I can do?
For the first one: I have no idea.
For the second:
Use arrays? I could make an array representing a group, and input sounds as its positions. E.g. voices_group[0]= scream_sound;
voices_group [1]= (another sound); etc.
And if I want to check if any sound is playing, I run a for-loop from 0 to (number of sounds-1).
I'm confused and need help. Or maybe there's no way?