Lesson 14 - Sound add

Student would like to make it play the coin sound when guano scale changes from 4 to 0 and only when it changes. Not when it is equal to 0. Can someone help?

Thank you

Use a variable to store the previous scale, at the end of each loop check whether the previous scale was 4 and the current scale is 0.

However this is extremely counter intuitive as you should just set the visiblity of guano to false.

1 Like

@burnsk, Were you able to get it to work? Let us know if you still need any assistance on it.



@mwood Yes thanks so much, the student was happy to see it work as they were hoping.

1 Like