Random Rain Sounds in GameMaker

134 Views Asked by At

I’m making a game with GameMaker 1.4 and I’m in a dungeon room and I want to add drop sounds (like it’s damp) randomly.

Thank You!

2

There are 2 best solutions below

0
Henry Hsu On

Depending on how often you want the raindrop sound to play, you can use the random_range() function (https://docs.yoyogames.com/source/dadiospice/002_reference/maths/real%20valued%20functions/random_range.html) to variably count up to a pre-defined variable amount, or if it hits a specific number (like rolling a 1 through 4 on a 10 sided dice). Once that amount is hit, either randomly or by adding up to a threshold amount, you can just play the raindrop soundfile you have normally by using the audio_play_sound() function (https://docs.yoyogames.com/source/dadiospice/002_reference/game%20assets/sounds/audio_play_sound.html)

0
Fariq On

Just make a sound that plays random rain drop sounds in random times. I figured out that if you do that it saves you a lot of hassle if you wanna go fast. I only recomend programming if you wanna add depth to your game or you have a big team to help you.