Add Sound Effects

add sound effects

How to implement this Pattern in MakeCode

Sound Effect for Food Collection

Click on the plus sign next to the destroy otherSprite block and you can choose from many effects that happen to your sprite when the Food gets collected and how soon that effect happens. In the block below the confetti effects happens very quickly after the Food is touched.

Sound Effect Food Collection

Sound Effect for Enemy getting Zapped

This requires you to have added the Jumping on Enemies pattern. In the on sprite of kind Player overlaps otherSprite of kind Enemy condition listener loop add a block which plays a sound effect. You can experiment to see which one you like best.

Sound Effect Enemy getting Zapped

Test your Changes and Next Steps

Test your game to check that your changes have the desired behaviour and that there are no side effects.

This Game Pattern is one of many allowing you to make improvements to your platform game and to learn coding and wider computing concepts. Find more on the Game Pattern page.

A next step you might want to try is to add a sound track.