ScratchData LogoScratchData
Back to Tutor-42's profile

Scratch Can't Count

TUTutor-42•Created August 9, 2019
Scratch Can't Count
1
1
26 views
View on Scratch

Instructions

Problems with two "when Green Flag clicked" scripts. A six line project that counts to 3 and plays a musical note three times. * What could possibly go wrong? * Green Flag to run the project. Green Flag to run the project again - different results! The loop alternates repeating 4 times or 0 times. The project never works properly! Even if we add the instruction "Click the Green Flag twice" the project doesn't work properly. This program doesn't work because the bottom "when Green Flag clicked" script always runs before the top script when we click the Green Flag. Here is a project with identical code that always works because the top "when Green Flag clicked" script always runs before the bottom script: https://scratch.mit.edu/projects/325392505/

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 ID323749687
CreatedAugust 9, 2019
Last ModifiedAugust 24, 2019
SharedAugust 24, 2019
Visibilityvisible
CommentsAllowed