Unit 3 Lesson 16 Circle 10 - Sound effects when you use isTouching block

Here’s a tip for you to find a solution so it only plays ONE sound inside the draw loop. Use the == comparison operator. We wanted the program to make a “happy” noise when the frog jumped over the mushroom. To do this, find a coordinate where the mushroom will for sure cross on the X -axis. Example mushroom.x == 101 and IF the mushroom.x == 101 have it play a sound and it will only play once because it only equals 101 for a very short time. This was a fix for us. However, be selective when choosing your x-axis intercept number. If your counter pattern is mushroom.x = mushroom.x + 4 PLEASE note that only every 4th number works.