Goal:
After looking at the shark costumes, you should notice that the damaged costume is 4 indexes away from the undamaged one (for example, the moving left costume is 2 and the moving left damaged costume is 6).
With this in mind let’s add the following code which will use the shark’s current costume number to decide which sprite to use.
Steps:
- From Looks, we need two switch costume to blocks that we will place before and after the repeat until block.
- From Operators, place a + block into the first switch costume to block. Then place a – block into the second switch costume to block.
- From Looks, place a costume number block into the left side of the + block and a – blocks.
- Set the right side of the + and – block to 4.