This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-04-10 15:30:13

shotgun12321
Scratcher
Registered: 2008-04-10
Posts: 3

World Reset

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

 

#2 2008-04-10 15:46:53

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: World Reset

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.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2008-04-10 16:02:16

Toasty
Scratcher
Registered: 2007-07-01
Posts: 500+

Re: World Reset

Or if you don't want to mess it around like that do a <if>a key pressed<go to x sad  start position )y sad


http://i44.tinypic.com/263wpxe.png
Lovin' Toast

Offline

 

#4 2008-04-10 18:07:52

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: World Reset

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.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#5 2008-04-10 23:51:44

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: World Reset

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

 

#6 2008-04-14 14:58:49

shotgun12321
Scratcher
Registered: 2008-04-10
Posts: 3

Re: World Reset

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

 

#7 2008-04-15 09:25:30

shotgun12321
Scratcher
Registered: 2008-04-10
Posts: 3

Re: World Reset

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  smile
http://scratchanimation.wordpress.com/

Offline

 

Board footer