Hello! Today’s post is going to be a short one but a very important one, adding sound! I added a coin.wav and audio.play(snd_coin) to when the player collects a coin. Here’s the code.
-- Added to line 16 snd_coin = audio.loadSound("coin.wav") -- Set coin sound variable -- Added to line 126 audio.play(snd_coin);
I know this is a short and simple, but it’s important to have sound in your game. As always, you can download the full source code below.