• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

audio group

RODO

Member
hello guys, I wanted to ask for help on a new topic for me: Audio Group.

I'm having trouble using this "new system", it seems complex and difficult to understand. I managed to apply a part of its concept in my game and it works well but it is getting complicated, I will explain in more detail below.
Well, I started using Audio Group when I realized that my game is getting heavy due to the amount of music, sounds and different audios used in it and I needed to manage it better in memory, so I separated into groups and it worked in parts. The sound environment audio group works very well, I had no problem programming it (although I think I did it the wrong way), I did it this way here:

GML:
//Create Evente



music_jogo = noone; //a variable to control which music will be use

silenciando = false; //a control variable that destroys obj_control_sound

audio_group_load(Musics_games

//Async - Save/Load
if(room == menu) && (audio_group_is_loaded(Musics_games
{
    music_jogo = sound_menu
    audio_play_sound(music_jogo,6,true)
}
else if(room == transicao_1) && (audio_group_is_loaded(Musics_games)
{
     music_jogo = sound_florest
    audio_play_sound(music_jogo,6,true)
}
else if(room == fase_1) &&  (audio_group_is_loaded(Musics_games)
{
    music_jogo = sound_fase_1
    audio_play_sound(music_jogo,6,true)
}
Well, to other events but those two are the main ones and well, so it works for what I want, the problem comes now. When I was getting ready to do the sound effects (hits, life gain, attack, etc.) it wasn’t working, even though I put it in an obj to load the sound effects audio group, I soon started to get even more lost in the audio group and not Knowing when to use it and where to use it, besides I don't know how to activate them properly.
It turned out to be a giant snowball, where I don't know what and where the error is and how can I play the sounds of effects or any other sound using audio group. Would someone explain to me how it works? or indicate a document that I can use to better understand? if anyone can help me I appreciate it and a lot of help
 
Top