Discuss Scratch
- Discussion Forums
- » Suggestions
- » Scratch Workaround Guide VII
- _nix
-
1000+ posts
Scratch Workaround Guide VII
very dangerous if misused, and as such, I'm not too sure if I should post it here.Is it a workaround for “when mouse over love/fave”, which is also a workaround for “when mouse over report”? In that case, yes, I'm aware, and yes, that's half the reason it's not in this guide I found a workaround that can be

(The other half is that people probably shouldn't be trying to detect loves/faves from inside the project anyway. That's a “connecting to the outside world” feature which was left out of Scratch for a reason.)
Last edited by _nix (Feb. 19, 2023 22:57:37)
- INSERT-USER_NAME
-
1000+ posts
Scratch Workaround Guide VII
Nah, it's basically an “always” block, and it continuously runs all the blocks under it like a forever loop no matter what, the only way to stop it is the pause button that only can be found in TurboWarp or the nono word.very dangerous if misused, and as such, I'm not too sure if I should post it here.Is it a workaround for “when mouse over love/fave”, which is also a workaround for “when mouse over report”? In that case, yes, I'm aware, and yes, that's half the reason it's not in this guide I found a workaround that can be
- qwerty_wasd_gone
-
1000+ posts
Scratch Workaround Guide VII
the when <> is true workaround?Nah, it's basically an “always” block, and it continuously runs all the blocks under it like a forever loop no matter what, the only way to stop it is the pause button that only can be found in TurboWarp or the nono word.very dangerous if misused, and as such, I'm not too sure if I should post it here.Is it a workaround for “when mouse over love/fave”, which is also a workaround for “when mouse over report”? In that case, yes, I'm aware, and yes, that's half the reason it's not in this guide I found a workaround that can be
- INSERT-USER_NAME
-
1000+ posts
Scratch Workaround Guide VII
No, it'sthe when <> is true workaround?Nah, it's basically an “always” block, and it continuously runs all the blocks under it like a forever loop no matter what, the only way to stop it is the pause button that only can be found in TurboWarp or the nono word.very dangerous if misused, and as such, I'm not too sure if I should post it here.Is it a workaround for “when mouse over love/fave”, which is also a workaround for “when mouse over report”? In that case, yes, I'm aware, and yes, that's half the reason it's not in this guide I found a workaround that can be
- qwerty_wasd_gone
-
1000+ posts
Scratch Workaround Guide VII
No, it'sthe when <> is true workaround?Nah, it's basically an “always” block, and it continuously runs all the blocks under it like a forever loop no matter what, the only way to stop it is the pause button that only can be found in TurboWarp or the nono word.very dangerous if misused, and as such, I'm not too sure if I should post it here.Is it a workaround for “when mouse over love/fave”, which is also a workaround for “when mouse over report”? In that case, yes, I'm aware, and yes, that's half the reason it's not in this guide I found a workaround that can be
when [timer v] > (0.001)not dangerous
reset timer
...
- INSERT-USER_NAME
-
1000+ posts
Scratch Workaround Guide VII
I said dangerous if misused, as there's almost no way to stop the script as it will forever keep on running.No, it'sthe when <> is true workaround? Nah, it's basically an “always” block, and it continuously runs all the blocks under it like a forever loop no matter what, the only way to stop it is the pause button that only can be found in TurboWarp or the nono word.when [timer v] > (0.001)not dangerous
reset timer
...
Still, I'm not sure if it could go here.
- qwerty_wasd_gone
-
1000+ posts
Scratch Workaround Guide VII
just press see inside then remove the script from the project, problem solvedI said dangerous if misused, as there's almost no way to stop the script as it will forever keep on running.No, it'sthe when <> is true workaround? Nah, it's basically an “always” block, and it continuously runs all the blocks under it like a forever loop no matter what, the only way to stop it is the pause button that only can be found in TurboWarp or the nono word.when [timer v] > (0.001)not dangerous
reset timer
...
Still, I'm not sure if it could go here.
- medians
-
1000+ posts
Scratch Workaround Guide VII
Cloud projects? Large projects? just press see inside then remove the script from the project, problem solved
- qwerty_wasd_gone
-
1000+ posts
Scratch Workaround Guide VII
leave the project, thereCloud projects? Large projects? just press see inside then remove the script from the project, problem solved
- medians
-
1000+ posts
Scratch Workaround Guide VII
Rip the people who want to play the project but without the script lol. And remixing projects to forget they remixed them.leave the project, thereCloud projects? Large projects? just press see inside then remove the script from the project, problem solved
Last edited by medians (Feb. 20, 2023 17:18:16)
- MSE666
-
26 posts
Scratch Workaround Guide VII
yseOkay but blocks that do this cannot be shared because they crash Scratch. DON'T CREATE CODE BLOCK ON TO LOW FGSwhen I start as a cloneOR
create clone of [ v]
delete this clonewhen green flag clicked
forever
add (HELP ME:: list) to [HELP ME v]
end
- MSE666
-
26 posts
Scratch Workaround Guide VII
Last edited by MSE666 (March 4, 2023 08:43:06)
- 1080GBA
-
500+ posts
Scratch Workaround Guide VII
bruhPlease stop asking. I will make a post clearly stating that I'm looking to have someone else maintain the thread or create their own workaround guide. I haven't decided when yet, so you'd be better off not expecting it any time soon. It'll probably be when I'm less active on the site in general or am too busy with other work to make suitable updates. when can i have the sticky
In my opinion, besides adding newly shared workarounds every now and then (which I am still doing!), the guide doesn't currently need that much maintenance or expanding, which is why I am not handing it off to anyone else right now.
- CrSb0001
-
10 posts
Scratch Workaround Guide VII
Here is another method for exponentiation:
Hopefully I wrote this correctly, if I didn't, here's the link to my cookie clicker script that I use the code in: https://scratch-mit-edu.ezproxyberklee.flo.org/projects/814368636/editor/ (in the Cookie sprite)
Edit: eh, it worked well enough. I had a hard time typing most of the code by hand tbh
define pow(base)(power)
set [result v] to [1]
set [base v] to (base)
set [power v] to (round (power))
set [done v] to [0]
if <(power) < [0]> then
set [base v] to [((1) / (base))]
set [power v] to [-1(() *(round (power))]
end
repeat until <[done v] = [1]>
if <(([power v]) mod (2)) = [0]> then
set [result v] to (([result v]) * ([base v]))
change [power v] by (-1)
end
if <(([power v]) mod (2)) > [0]> then
set [done v] to [1]
end
if <<not <<[done v] = [1]>>>
set [base v] to (([base v]) * ([base v]))
set [power v] to (([power v]) / (2))
end
end
Hopefully I wrote this correctly, if I didn't, here's the link to my cookie clicker script that I use the code in: https://scratch-mit-edu.ezproxyberklee.flo.org/projects/814368636/editor/ (in the Cookie sprite)
Edit: eh, it worked well enough. I had a hard time typing most of the code by hand tbh
Last edited by CrSb0001 (April 11, 2023 14:32:23)
- 5_g
-
1000+ posts
Scratch Workaround Guide VII
that is so complicated for something so simple in other programming languages, no wonder most projects on scratch run horribly Here is another method for exponentiation:define pow(base)(power)
set [result v] to [1]
set [base v] to (base)
set [power v] to (round (power))
set [done v] to [0]
if <(power) < [0]> then
set [base v] to [((1) / (base))]
set [power v] to [-1(() *(round (power))]
end
repeat until <[done v] = [1]>
if <(([power v]) mod (2)) = [0]> then
set [result v] to (([result v]) * ([base v]))
change [power v] by (-1)
end
if <(([power v]) mod (2)) > [0]> then
set [done v] to [1]
end
if <<not <<[done v] = [1]>>>
set [base v] to (([base v]) * ([base v]))
set [power v] to (([power v]) / (2))
end
end
Hopefully I wrote this correctly, if I didn't, here's the link to my cookie clicker script that I use the code in: https://scratch-mit-edu.ezproxyberklee.flo.org/projects/814368636/editor/ (in the Cookie sprite)
Edit: eh, it worked well enough. I had a hard time typing most of the code by hand tbh
- MyScratchedAccount
-
1000+ posts
Scratch Workaround Guide VII
Can you add the custom charcters workaround
FOR THE HAT BLOCK, you need to hack JSON
<key [(join [NOT ON THE LIST CHARACTER HERE] []) pressed?>
FOR THE HAT BLOCK, you need to hack JSON
- medians
-
1000+ posts
Scratch Workaround Guide VII
Can you add the custom charcters workaroundI was about to be like wait, but don’t you need to hack json both times?<key [(join [NOT ON THE LIST CHARACTER HERE] []) pressed?>
FOR THE HAT BLOCK, you need to hack JSON
You can’t put reporters in that block in 2.0 or earlier without hacking.
Anyway, that method doesn’t work with certain keys, so if this was added, maybe that could be mentioned.
Also the code should be like this:
<key (join [not on character list] []) pressed?>
- CrSb0001
-
10 posts
Scratch Workaround Guide VII
that is so complicated for something so simple in other programming languages, no wonder most projects on scratch run horribly Here is another method for exponentiation:define pow(base)(power)
set [result v] to [1]
set [base v] to (base)
set [power v] to (round (power))
set [done v] to [0]
if <(power) < [0]> then
set [base v] to [((1) / (base))]
set [power v] to [-1(() *(round (power))]
end
repeat until <[done v] = [1]>
if <(([power v]) mod (2)) = [0]> then
set [result v] to (([result v]) * ([base v]))
change [power v] by (-1)
end
if <(([power v]) mod (2)) > [0]> then
set [done v] to [1]
end
if <<not <<[done v] = [1]>>>
set [base v] to (([base v]) * ([base v]))
set [power v] to (([power v]) / (2))
end
end
Hopefully I wrote this correctly, if I didn't, here's the link to my cookie clicker script that I use the code in: https://scratch-mit-edu.ezproxyberklee.flo.org/projects/814368636/editor/ (in the Cookie sprite)
Edit: eh, it worked well enough. I had a hard time typing most of the code by hand tbh
Sorry about it being so long, I got this from Stack Overflow. The person who gave me the code wasn't really good with Scratch, I'll try to see if I can simplify it somehow :\
Edit: the exponentiation script was derived for a script with the same function in C, that's why it's so difficult to understand tbh.
Edit 2: It's based off of a C script for exponentiation by squaring
Last edited by CrSb0001 (March 13, 2023 14:36:03)
- 10data10
-
100+ posts
Scratch Workaround Guide VII
This may cross the line of being too complex for your guide but people are frequently asking about how to do this so it might help to have workarounds (or a few workarounds) included.
Clones don’t have names and therefore they can’t be used in these blocks the way Sprites can.
Basically the workaround is to have local clone ID variables with constantly running forever loops in each clone that store its X position, its Y position, its direction, its costume, size, local variables and other information into sets of lists and that other sprites and clones can access and use and if necessary use the Pythagorean equation and trig. See, simple.
There are a number of examples but, as far as I can tell, are not collected anywhere.
I like this one by legendary34678 showing how sprites can be bonded together
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/719996268/
And this one from WildTraces showing how clones can detect distance to other clones and move away.
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/384145242
And many others that are probably better but in a search they end up being buried by Star Wars projects.
TL;DR
Because clones don’t have names they cannot be used in certain Scratch Blocks. The workaround is to move to the SNAP website and do your programming there.
Clones don’t have names and therefore they can’t be used in these blocks the way Sprites can.
go to [ v]
point towards [ v]
<touching [ v] ?>
(distance to [ v])
([ v] of [Clone v])
Basically the workaround is to have local clone ID variables with constantly running forever loops in each clone that store its X position, its Y position, its direction, its costume, size, local variables and other information into sets of lists and that other sprites and clones can access and use and if necessary use the Pythagorean equation and trig. See, simple.
There are a number of examples but, as far as I can tell, are not collected anywhere.
I like this one by legendary34678 showing how sprites can be bonded together
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/719996268/
And this one from WildTraces showing how clones can detect distance to other clones and move away.
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/384145242
And many others that are probably better but in a search they end up being buried by Star Wars projects.
TL;DR
Because clones don’t have names they cannot be used in certain Scratch Blocks. The workaround is to move to the SNAP website and do your programming there.