Step 8 of 8
100%
Challenge
Add more drums
To add another drum to unlock, look back at the earlier steps of the project.
Here are some reminders if you need them.
Improve feedback to the player
Tell the player exactly how many more beats are needed to unlock the next drum.
Add this code to join the number of beats needed with the text you have used to tell the player they need more beats if they do not have enough to unlock the next drum:
when this sprite clicked
if <(beats)> [9]> then //if 10 or more beats
hide
change [beats v] by [-10] //take away the cost of upgrade
else
+ say (join ((10) - (beats)) [beats needed!]) for [2] seconds
end
Note: Update the numbers to match those needed to unlock each drum.
Tidy your code
Tidy: If you have time, then it's a good idea to make sure the sprites in the sprite list are in a sensible order, starting with the drums in their locked order and then the buttons in order.
Stuck?
Debug: First make sure you really understand when the drums and buttons should show and how the beats variable should change. It's much easier to debug a project if you are clear on what it is supposed to do.
Tip: If you get really muddled then it's fine to delete the new drum and its button, and start again. Sometimes it is hard to spot a bug.
JuaraKu