If that is what you want, try this:
CREATION CODE obj_player:
current_snd = 0; //This is what coin sound should be played the next time you collect a coin. Leave this value at 0. coin_sound[0] = snd_coin; //This stores the value of the first coin sound. Remember that array values start at 0 and not 1. coin_sound[1] = snd_coin2; //This stores the value of the second coin sound. coin_sound[2] = snd_coin3; //This stores the value of the third coin sound.
COLLISION EVENT (with coin) obj_player:
sound_play(coin_sound[current_snd]); //This plays the current coin sound.
current_snd += 1; //This changes the coin sound the next time a coin is collected.
if current_snd > 2 {current_snd = 0;} //Once the current_snd is at the third sound, it will start at the first sound again!Let me know if this helps!



Find content
Male
