ScratchData LogoScratchData
Back to papipupepappa's profile

Sound Block Delay

PApapipupepappa•Created April 21, 2023
Sound Block Delay
49
35
446 views
View on Scratch

Instructions

Did you know that blocks that set or change sound properties pauses the execution of the script for one frame? Click the green flag and watch how changing sound properties affect sprites. Try running it in Turbo Mode (shift-click the green flag to turn it on/off) for another surprise. ℹ️ Follow-up projects: How to Avoid Sound Block Delays: https://scratch.mit.edu/projects/839115622/ How to Avoid Sound Block Delays 2: https://scratch.mit.edu/projects/839141172/

Description

⏱ ⏱ ⏱ Notes ⏱ ⏱ ⏱ All cat sprites start out pointing in direction 90, and then run a forever loop turning 1 degree each loop. All cat sprites except the top one also have a custom block with the "run without screen refresh" option checked. The custom block in the second cat sprite from the top, there is a loop changing 2 motion properties and 1 looks property 100 times, and then resetting them. As expected, this causes no delay because the "run without screen refresh" option is checked. The custom blocks in the cat sprites below it all change sound properties. As you can see, each change of a sound property causes a one-frame delay even though they are in custom blocks with the "run without screen refresh" option checked. ⏱ ⏱ ⏱ Credits ⏱ ⏱ ⏱ Thanks to @SimonCheeseburger for letting me know that Turbo Mode is affected as well. This has caused problems in my projects many times, but I couldn't quite put my finger on the cause until I read this: https://docs.turbowarp.org/remove-misc-limits

Project Details

Project ID838931018
CreatedApril 21, 2023
Last ModifiedApril 25, 2023
SharedApril 21, 2023
Visibilityvisible
CommentsAllowed