Now that you have one receiver working, you can copy it to add more receiver sprites toyour passing drill. In this video you will create the rest of those receivers. Rightclick on the receiver sprite in the sprites area, and select duplicate. Do this as manytimes as you want receivers. It looks a little weird that the receiversprite catches the ball while the ball keeps moving to the edge of the stage. Fix thisby making the ball sprite stop at the receiver just like it does at the edge of the stage.
Click on the ball sprite. From the "operators" menu, drag out an "or"block. Remove the “touching edge” block fromthe “repeat until” block, and place it inside the first blank of the “or” block.
Then, from the “sensing” menu, place the “touching color” block into the otherside of the “or” block. To choose a color, click the color swatch on the block, thenwith the mouse pointer click a color that all the receiver sprites have on them. Placethe “or” block back into the “repeat until” block. The code reads “repeat movinguntil touching the edge or the color that’s on the receiver sprites.” Test the codeby clicking the flag. The ball sprite should go back to its starting location when it touchesthe edge or a receiver. That’s more realistic. Tinker around with the numbers in your code.
If you think the receivers move too quickly, put a smaller number in the "move" block.
To change the speed at which the ball sprite turns, change the numbers in the "turn" blocks.
Explore, test, and make this passing drill your own!
Here's the game plan: Copy the receiver sprite by right clickingit and choosing “duplicate.” Change the ball sprite's “repeat until”to use “or” and “touching color.” Tinker with the values!
Once you've done all that, move on to the next page to check out some add-ons!