# gold mammoth

Member Since 10 Aug 2008
Offline Last Active Feb 19 2013 09:18 PM

### In Topic: Randomly choose a sound when player touches coin,

29 September 2012 - 01:35 AM

Do you mean when you collect a coin it plays sound1, then the next time you collect a coin it plays sound2, and then the next time you collect a coin it plays sound3, then it goes back playing sound1 the next time, repeating like that? So there is 1 coin object, but it just changes the sound in a order.

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!

### In Topic: Question: Is Isometric more difficult?

28 September 2012 - 04:34 AM

I recommend programming it in 2D, and just drawing it isometrically (it makes programming it a LOT easier). I'm also making an isometric game and that's how I'm programming it for the most part.

EDIT:
`sound_play(choose(snd_coin,snd_coin2,snd_coin3));`