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

#1 2008-11-02 06:57:54

teacher1
Scratcher
Registered: 2008-06-09
Posts: 5

moving on

I have been 'playing with scratch for a while - with my year 3 children and we have a couple of queries, which I haven't been able to sort out.
1. How can I return the sprite back to the beginning of a program to check whether my edits are working.
2. How can I make different sprites start at the same time - or to follow one after the other without using different starting keys? ie make my name jump/move etc one after qanother?
Many thanks
Mrs G Hollamby

Offline

 

#2 2008-11-02 11:07:47

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: moving on

1.  As the first block in your program, have "goto X: Y:", where X and Y are the start coordinates of your sprite.  Then whenever your program is run you sprite will start from the same place.

2. There are lots of different ways of begining a script, and so there are many different ways of having scripts start together or start sequentially.
The most efficient, I find, is to use broadcasts.

On your background, you can create a script that consists of
When Green Flag Clicked
  Broadcast 'Activate Sprite1" and wait
  Broadcast 'Activate Sprite2" and wait
  Broadcast 'Activate Sprite3" and wait
  etc
Then on each sprite, you can start the scripts with "When I recieve"...

That way, all the sprites which start with "When I receive Activate Sprite1" will activate together.  Then, when they have all stopped, the sprites that start with "When I receive Activate Sprite2" will act, etc.

See my "Creation of the World" project for an example.

The only difficulty there is if you want a sprite to act forever, in which case you will cannot use "Broadcast and wait", as it would wait forever.

Instead, you would have to use
"Broadcast Activate Sprite1."
"Wait xxx seconds."
"Broadcast Activate Sprite2."

where xxx is the amount of time you want between activating the first set of sprites and the second.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#3 2008-11-05 10:21:59

teacher1
Scratcher
Registered: 2008-06-09
Posts: 5

Re: moving on

1. Thanks, but that just puts the sprite back to where it started, it doesn't re-orientate it back. So, eg.  if I have turned it 15 degs. the sprite stays at that angle. The children find it very frustrating when they are trying to work out a program by trial. What do you do when you are building a program?

Offline

 

#4 2008-11-05 15:42:30

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

Re: moving on

teacher1 wrote:

1. Thanks, but that just puts the sprite back to where it started, it doesn't re-orientate it back. So, eg.  if I have turned it 15 degs. the sprite stays at that angle. The children find it very frustrating when they are trying to work out a program by trial. What do you do when you are building a program?

So in addition to having a Go To X,Y block as one of your first blocks, also put a Point in Direction xx  block so you know it is oriented properly.  You may also want to set the costume, the size, any graphic effects and so on.  It's important to set the initial state of each sprite so the project can be rerun consistently.  There is no automatic way to do it, you need to put blocks in at the start of the project (usually run off the green flag) for each sprite to make sure they are set up properly.


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

Offline

 

#5 2008-11-06 01:46:58

maki
Scratcher
Registered: 2008-01-21
Posts: 100+

Re: moving on

You also need to reset any variables that were changed if they're supposed to be reset.


Creepers are exceptionally volatile.

Offline

 

#6 2008-11-06 11:09:40

teacher1
Scratcher
Registered: 2008-06-09
Posts: 5

Re: moving on

Thanks I'll try it.

Offline

 

Board footer