Discuss Scratch

staggroom8
Teacher
1 post

Reset to "starting position"

My students are testing their scripts by pressing on the green flag. The sprite may move or rotate based on the blocks they've chosen. How do they get it back into the “starting position” (ie they rotated the sprite 90 degrees, but want to get it back into the upright position to test again)? I feel like we're all missing something pretty obvious here. Thank you!
Scratch-Minion
Scratcher
1000+ posts

Reset to "starting position"

When a Scratch project is run, its runtime data (position and direction of sprites etc) is updated.
If the project is then run a second time without exiting and reloading the project, the data will start from that updated runtime data.


To force a project to start with certain data every time, we set that data after the Green Flag.

So for each sprite that may move, we must goto its original position after the Green Flag.
For each sprite that may turn, we must set direction to its start direction after the Green Flag. (The default start direction for a sprite is 90).
Same if we resize a sprite etc.
Also any data such as Score, Lives Remaining, etc must be reset to their starting values.
Ethan4lfe
New Scratcher
1 post

Reset to "starting position"

hi
deck26
Scratcher
1000+ posts

Reset to "starting position"

Ethan4lfe wrote:

hi
Please don't spam or necropost. You've added nothing useful to this topic and have moved it back to the top of the forum.
Reallife123765
Scratcher
2 posts

Reset to "starting position"

Good afternoon , how do you set a starting position for the start of a programme
deck26
Scratcher
1000+ posts

Reset to "starting position"

Reallife123765 wrote:

Good afternoon , how do you set a starting position for the start of a programme
Best to create your own new topic rather than necropost.

You can just set things in green flag scripts but even better practice is to do something like this.

when green flag clicked   // only one in project
broadcast [initialise v] and wait // sprites/stage respond by setting variables etc
broadcast [ready v] // only run rest of project code now
Reallife123765
Scratcher
2 posts

Reset to "starting position"

deck26 wrote:

Reallife123765 wrote:

Good afternoon , how do you set a starting position for the start of a programme
Best to create your own new topic rather than necropost.

You can just set things in green flag scripts but even better practice is to do something like this.

when green flag clicked   // only one in project
broadcast [initialise v] and wait // sprites/stage respond by setting variables etc
broadcast [ready v] // only run rest of project code now


Thank you

Powered by DjangoBB