Me and my friend in school are doing a project where we must learn Scratch and create our own lessons for future Computer Science generations. We have been "toying" with Scratch for a few weeks, we have gotten to know the general layout of the program.
But one of the problems we have ran into the past couple days, is, whenever we are making a script, then we have to "mess" around with the code, to get it perfect, we cannot find how to reset the sprites positions without having to open the document back up again.
Does anyone else have this problem? And could someone please help us out, if you know what we are doing wrong or something we haven't tried.
Thank you very much.
Offline
Most Scratch programmers set up a Green Flag Hat block on each sprite to intialize the sprites to the proper starting position, direction, costume, etc. Then all it takes is a click on the Green Flag and the project is initialized.
Offline
True, although I try to avoid the green flag as much as possible on large projects, mainly because I intend to post some projects on a website outside of Scratch, and the flag/stop sign interface is kind of confusing. To do this, I reset a variable called "firstrun" before uploading the project. Then when someone loads it online, the variable is set to 1. If the flag is clicked and firstrun = 1, the button does nothing. Then, add a menu button that brings you back to a main menu, or a reset button that does essentially what the flag would.
Offline
I generally use the approach that Paddle2 outlined. Use the Green Flag to "initialize" the variables and the positions of the sprites, then use some other key to actually "start" the program.
You could even have the "Green Flag" just send a broadcast like "Initialize" and use that to set everything up. That way, it would be easy to program another key (perhaps "r" for "Reset") to also send the "Initialize" broadcast.
-MrEd
Offline
Wow, that makes a lot of sense, I will talk with my other team member about trying that.
Thanks a lot everyone, especially Paddle2see.
Offline
Also here is a link to the Blog that me and my classmate are working on while learning/using Scratch. Visit if you like, make some posts
http://scratchanimation.wordpress.com/
Offline