ScratchData LogoScratchData
Back to Tutor-42's profile

Scratch Can't Count Fixed - 1

TUTutor-42•Created August 10, 2019
Scratch Can't Count Fixed - 1
0
0
1 views
View on Scratch

Instructions

In the project Scratch Can't Count https://scratch.mit.edu/projects/323749687/ the "when I receive Initialize" script here was instead a second "when Green Flag clicked" script. That project didn't work as the two "when Green Flag clicked" scripts ran in the wrong order. This project uses the "broadcast Initialize and wait" block to force the bottom script to set Count to 0 before we execute the repeat loop in the top script. Note that there is only one "when Green Flag clicked" script in this project. (In this small project we could have just one script and set Count to 0 rather than using the broadcast. Often, however, code we want executed first may be in a different sprite, so this project demonstrates the more general "broadcast Initialize and wait" method).

Description

https://scratch.mit.edu/discuss/post/3680365/ ** See this tutorial which explains the following topics and more: - why two "when Green Flag scripts" in a project may cause problems (ie. how two "identical" projects run differently because their scripts run in a different order) * how to write projects to fix these problems - why some projects say "Click the Green Flag twice" - how this project works in detail including how scripts pause and yield to allow other scripts to run - how Scratch decides the order to run scripts

Project Details

Project ID323770797
CreatedAugust 10, 2019
Last ModifiedSeptember 5, 2019
SharedSeptember 5, 2019
Visibilityvisible
CommentsAllowed