Discuss Scratch
- Discussion Forums
- » Suggestions
- » Scratch Workaround Guide VII
- The_Cool_Test_Alt
-
Scratcher
100+ posts
Scratch Workaround Guide VII
Wait, it happens because the sound blocks are “motion-causing”, right? Well, we could just put the set volume in a run-without-screen-refresh block, right?

WHY MUST SOUND BLOCKS CAUSE ACTUAL WAITS?!?! WHY ARE THE SOUND BLOCKS SO MEAN TO US?!?!

WHY MUST SOUND BLOCKS CAUSE ACTUAL WAITS?!?! WHY ARE THE SOUND BLOCKS SO MEAN TO US?!?!
Last edited by The_Cool_Test_Alt (Nov. 5, 2025 21:41:46)
- CodeComet6161
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
here's something that triggered me:
Visit the project! This is a simple context menu example which uses variables and a "when stage clikced" block (in the Stage) to detect clicking twice within a short time. Note that the Stage includes two example scripts, one which disables the context menu under certain backdrops and one which doesn't, so you'll have to choose the one which works for your project or remove one if you want to try it out.
- Olivia_AM
-
Scratcher
100+ posts
Scratch Workaround Guide VII
Here is a better power block:
define (x)^(y)
if <(x)<(0)> then
set [result v] to (([e^ v] of ((y)*([ln v] of ((0)-(x))))::operators)*([cos v] of ((180)*(y)
else
set [result v] to ([e^ v] of ((y)*([ln v] of (x)))::operators
Last edited by Olivia_AM (Nov. 10, 2025 13:05:58)
- UserBlockedYou
-
Scratcher
58 posts
Scratch Workaround Guide VII
After reading the table of contents, I realized that there isn't a Workaround for the sounds category blocks, which is surprising since every other category has been covered. So I figured I would give my suggestion (note, this trick has been widely known & used. However I suggested it to make the list feel more complete and for people who do not know it) This is for theshould be set pitch to 0 not 100pause sound:: soundandunpause sound:: sound——————————————————————-
(I'l be setting u & p for the unpause and pause keys respectively but you can set the keys to anything you'd like or you can start the scripts with a broadcast or any other trigger)
You could just dowhen [p v] key pressedand
set volume to (0) %when [u v] key pressedfor the pause and unpause blocks respectively, but if you want the sound to start where it was stopped, you can do
set volume to (100) %when [p v] key pressedand
set [pitch v] effect to ((-1) / (0))
set volume to (0) %when [u v] key pressedThe
set [pitch v] effect to (100)
set volume to (100) %((-1) / (0))block gives you -Infinity and “pitch” doesn't just lower the pitch but the lowers the speed of the sound so when the earlier equation is used for the pitch, it makes the sound s u p e r s l o w and the set volume to (0) % block hides the slowed down sound and finally the latter script reverses the effect of the former script.
- wallaceji
-
New Scratcher
100+ posts
Scratch Workaround Guide VII
Then you should be able to search for blocks.
Scratch Workaround Guide Ⅶ
༺༻
If you’ve spent some time programming with Scratch, there is a pretty good chance that you’ve gone looking for a block which just doesn’t exist—some kind of action or utility that you can’t find in any of the existing blocks! The Scratch Team tries to keep the list of blocks minimal, so that it isn’t overwhelming or confusing for newer Scratchers (among several other reasons). That means we have to use the blocks we do have to come up with new behavior similar to the blocks we don’t have. That’s what a “workaround” is—using what you’ve got to make something new and useful!
- AndPherbCodes
-
Scratcher
100+ posts
Scratch Workaround Guide VII
Has anyone created a project that has all block workarounds?
- WsDanzel
-
Scratcher
52 posts
Scratch Workaround Guide VII
Has anyone created a project that has all block workarounds?By process of elimination!!! Not me
- hill_walker123
-
Scratcher
100+ posts
Scratch Workaround Guide VII
✽ rotate around sprite:
Use the basic trigonometry blocks “sin” and “cos” to follow the path a circle would make around the target sprite. (You can get those by dragging out the “abs of” block at the bottom of Operators and changing its dropdown menu.)define rotate (degrees) degrees around (sprite)
set [direction before custom block ran v] to (direction)
set [distance v] to (distance to (sprite))
point towards (sprite)
set x to (([x position v] of (sprite)) + ((distance :: variables) * ([sin v] of (((direction) + (180)) + (degrees)))
set y to (([y position v] of (sprite)) + ((distance :: variables) * ([cos v] of (((direction) + (180)) + (degrees)))
point in direction (direction before custom block ran)
turn cw (degrees) degrees // This helps the sprite look like it's following the circle.
This script uses geometry concepts to calculate where the sprite should end up. It works by calculating a circle whose center is exactly on the target sprite, and one of its points is where the running sprite is (so its radius is the distance from the running sprite to the target sprite). It uses that circle to calculate where the sprite would be if it followed an arc (of specified degrees) around the circle.
A lot of the blocks here have to do with converting between values that work for trigonometry math, and converting them back into the right values to put onto the actual screen.(Note that this exact workaround will make jagged lines if you're drawing with pen blocks, since it moves in two steps. You can replace the “set x” and “set y” blocks with a single “go to x: y:” block and it'll work the same way.)
- The “cos” and “sin” blocks expect a direction from 0 to 360 while Scratch's “direction” block goes from -180 to +180, so we add 180.
- “cos” and “sin” don't actually deal with distances at all, they just assume you're talking about a circle with radius 1, so we multiply the results by the distance between the running and target sprites to scale to the right radius.
- “cos” and “sin” also don't deal with position, they assume you're talking about a circle centered at (0, 0). So, we use normal addition blocks to translate (move) the point so it's relative to the target sprite.
aw, I didn't help anymore

nix bent the space-time continuum to prevent my assistance, dang you nix! /j
- _nix
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
Sorry.✽ rotate around sprite: (snip)aw, I didn't help anymore
nix bent the space-time continuum to prevent my assistance, dang you nix! /j
Thank you in retrospect in advance.- ViggyMish
-
Scratcher
30 posts
Scratch Workaround Guide VII
This block is not in Scratch:
but there is a workaround with the timer.
when stop clicked::hat events//It would be nice for thumbnails
but there is a workaround with the timer.
when [timer v] > (timer::variables)
code::#c0c0c0
when green flag clicked
forever
set [timer v] to (timer)
end
Last edited by ViggyMish (Jan. 2, 2026 08:43:43)
- alt_zohihar
-
Scratcher
3 posts
Scratch Workaround Guide VII
This block is not in Scratch:How can that work?when stop clicked::hat events//It would be nice for thumbnails
but there is a workaround with the timer.when [timer v] > (timer::variables)
code::#c0c0c0when green flag clicked
forever
set [timer v] to (timer)
end
Last edited by alt_zohihar (Jan. 2, 2026 18:58:55)
- CoolLock
-
Scratcher
500+ posts
Scratch Workaround Guide VII
The forever loop only works during runtime, so when the stop sign is pressed, the script stops and the variable stops increasing. However, the real timer (the blue one, which is the reporter, not the variable) always works even if the stop sign is pressed. So because the variable timer stops updating, the reporter timer will always be greater than it when the stop sign is pressed.This block is not in Scratch:How can that work?when stop clicked::hat events//It would be nice for thumbnails
but there is a workaround with the timer.when [timer v] > (timer::variables)
code::#c0c0c0when green flag clicked
forever
set [timer v] to (timer)
end
- pipses
-
Scratcher
15 posts
Scratch Workaround Guide VII
Some scratch workarounds
I think you should include that “while <boolean>” is the same as “repeat until not <boolean>”, and “repeat until <boolean>” is the same as “while not <boolean>”.
- Imtwentytenth
-
Scratcher
500+ posts
Scratch Workaround Guide VII
This block is not in Scratch:Well that is oficially rejected, because stop means STOPPING the project.when stop clicked::hat events//It would be nice for thumbnails
- ezriha
-
Scratcher
2 posts
Scratch Workaround Guide VII
Is there any workaround for a “pause timer” block?
[pause v] timer :: sensingI’m thinking it would have to use a timer workaround like the one listen on the Scratch Wiki’s article for workarounds but that takes use of the days since 2000 reporter and thus to make a timer able to be paused, you’d have to make a days since 2000 reporter able to be paused. And then if you take reset timer into account, assuming timer is still paused after resetting, you have to modify the pause timer. I assume it would be some sort of on/off switch for the timer, where the days since 2000 block is replaced with a variable acting the same way.
when green flag clicked(small bad mockup)
forever
if <(timermode) = [on]> then
set [timer 2 v] to ((dayssince2K) insert code here (timestamp))
else
set [dayssince2K v] to ((days since 2000) insert some code here (timestamp))
end
end
- Discussion Forums
- » Suggestions
-
» Scratch Workaround Guide VII
