Here is a code sequence that needs some debugging. We want the batter to approach the plate and swing at a ball. Every time the program is run, we want the batter to start from the right side of the screen in batting stance. Once at the plate, each costume change should be seen clearly. The problem is, if we are in editor view and drag the batter to the right side of the screen, the code seems like it is working the first time it is run. But the timing of the pitch and swing are off. Then, when the code sequence is run again, the batter is at the plate too early and swinging in the wrong order. Run the code multiple times. Can you debug and come up with a solution so the batter approaches the plate each time, swings in the correct order, and the costume changes can be seen better?
WARNING: Don't look at the possible solution sprite until you've tried debugging the code first yourself!