I am re-creating a project from Scratch Programming for Teens (by Jerry Lee Ford) to introduce programming to young students in a summer camp. The project is a simple fish tank with fish swimming back and forth.
This project uses the following code on each fish sprite:
when gf clicked forever move [1] steps if on edge, bounce end foreverThe book CD has the sample project; the fish swim to the screen edge then turn and swim the opposite direction when they hit the edge. My scripts are identical to his to animate the fish in the tank; however, when my fish **bounce**, the fish are reversed and upside down.
Offline
It's because it's set to rotate freely. Set it to only rotate left and right. It's on the top centre bar with the 3 buttons, click the <-> one.
Last edited by jontmy00 (2012-07-07 20:12:50)
Offline
I thought you had to have movement blocks after the bounce because the bounce just set it up?
Offline
It's a good helpful forum, but it is looser than i'm used to.
Offline
You have to go to your sprite, and click the bottom button next to the sprites x and y.
If you're confused, the image below may help. It's the button circled that you need to click.
Offline
By default, Scratch sprites won't appear mirrored if they're pointing to the left. With the rotation mode (as shown by the three buttons on the left of the diagram in ProgrammingPro01's post), you can choose full rotation, two-directional rotation, or no rotation for any sprite.
The two-directional rotation option will display the mirror image of the sprite if it's facing to the left. However, it won't be rotated; it will always remain pointing either straight to the left or right.
You might also consider creating special left-facing and right-facing costumes for each fish if you want them to be displayed at an angle, and simply switch to the appropriate costume based on the value of the direction variable.
Hope that helps. It's cool for me to hear about a summer programming camp for Scratch; that's how I was first introduced to the language. Good luck!
Last edited by amcerbu (2012-07-09 15:44:35)
Offline