Discuss Scratch
- Discussion Forums
- » Suggestions
- » Scratch Workaround Guide VII
- _nix
- Scratcher
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)
══ trans autistic lesbian enbydoggirls // 16 17 18 19 20 21, she/they ════
sparrows one word to the paragraph // <3 // ~(quasar) nebula
- INSERT-USER_NAME
- Scratcher
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
- Scratcher
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
shift+ctrl+down arrow to scroll
I may sometimes make mistakes, change my mind, etc., and edit my posts
When (::red) clicked :: events hat
repeat until <key [all v] pressed?>{
destroy this sprite::control cap
when @greenFlag misclicked::events hat
become idiot::custom}::control
(╯°□° ╯︵ ┻━┻::red)::#000000 reporter//this is brad, he creates cursed scripts like the one you saw above
(ㆆ_ㆆ)//this is max, he stares at you with that expression if you say you don't support my suggestion
You found me
- INSERT-USER_NAME
- Scratcher
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
- Scratcher
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
...
shift+ctrl+down arrow to scroll
I may sometimes make mistakes, change my mind, etc., and edit my posts
When (::red) clicked :: events hat
repeat until <key [all v] pressed?>{
destroy this sprite::control cap
when @greenFlag misclicked::events hat
become idiot::custom}::control
(╯°□° ╯︵ ┻━┻::red)::#000000 reporter//this is brad, he creates cursed scripts like the one you saw above
(ㆆ_ㆆ)//this is max, he stares at you with that expression if you say you don't support my suggestion
You found me
- INSERT-USER_NAME
- Scratcher
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
- Scratcher
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.
shift+ctrl+down arrow to scroll
I may sometimes make mistakes, change my mind, etc., and edit my posts
When (::red) clicked :: events hat
repeat until <key [all v] pressed?>{
destroy this sprite::control cap
when @greenFlag misclicked::events hat
become idiot::custom}::control
(╯°□° ╯︵ ┻━┻::red)::#000000 reporter//this is brad, he creates cursed scripts like the one you saw above
(ㆆ_ㆆ)//this is max, he stares at you with that expression if you say you don't support my suggestion
You found me
- medians
- Scratcher
1000+ posts
Scratch Workaround Guide VII
Cloud projects? Large projects? just press see inside then remove the script from the project, problem solved
Medians bamboozled by 3.0 (version 3.0): https://scratch-mit-edu.ezproxy.canberra.edu.au/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch-mit-edu.ezproxy.canberra.edu.au/studios/33739789
Describe favorite topics: https://scratch-mit-edu.ezproxy.canberra.edu.au/studios/35764610/
SP community won against Fandom :P
Years on internet: 16 (very close to 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that
Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.
Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness @interchangeably
i trolled redcat LOL
if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;
- qwerty_wasd_gone
- Scratcher
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
shift+ctrl+down arrow to scroll
I may sometimes make mistakes, change my mind, etc., and edit my posts
When (::red) clicked :: events hat
repeat until <key [all v] pressed?>{
destroy this sprite::control cap
when @greenFlag misclicked::events hat
become idiot::custom}::control
(╯°□° ╯︵ ┻━┻::red)::#000000 reporter//this is brad, he creates cursed scripts like the one you saw above
(ㆆ_ㆆ)//this is max, he stares at you with that expression if you say you don't support my suggestion
You found me
- medians
- Scratcher
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)
Medians bamboozled by 3.0 (version 3.0): https://scratch-mit-edu.ezproxy.canberra.edu.au/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch-mit-edu.ezproxy.canberra.edu.au/studios/33739789
Describe favorite topics: https://scratch-mit-edu.ezproxy.canberra.edu.au/studios/35764610/
SP community won against Fandom :P
Years on internet: 16 (very close to 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that
Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.
Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness @interchangeably
i trolled redcat LOL
if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;
- MSE666
- Scratcher
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
- Scratcher
26 posts
Scratch Workaround Guide VII
Last edited by MSE666 (March 4, 2023 08:43:06)
- 1080GBA
- Scratcher
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.
Follow 1080GBA forever::#1080ba hat⠀
Made by 1080GBA. All copyrights reserved.
————————————————————————————————————————————————————————————————————
self made custom cat block
————————————————————————————————————————————————————————————————————
3000th post in topic
500th post of myself
————————————————————————————————————————————————————————————————————
(((((((((((KING::#ff0000 ring)::#ff8800 ring)::#ffff00 ring)::#88ff00 ring)::#00ff88 ring)::#00ffff ring)::#0088ff ring)::#0000ff ring)::#8800ff ring)::#ff00ff ring)::#ff0088 ring)————————————————————————————————————————————————————————————————————
<<<<<<<<1080GBA::#000>::#222>::#444>::#666>::#888>::#aaa>::#ccc>::#eee>————————————————————————————————————————————————————————————————————
- CrSb0001
- Scratcher
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.ezproxy.canberra.edu.au/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.ezproxy.canberra.edu.au/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)
while <(boing)>Stack Overflow: CrSb0001
end
Youtube: CrSb0001
Instagram: CrSb0001
when @stopSign clicked :: hat :: events
- 5_g
- Scratcher
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.ezproxy.canberra.edu.au/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
- Scratcher
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
Links:
—
Give An Internet - - My Profile - My Best Project Of The Week - Am I Online? - on wiki, go to my talk
—
Scratched//Boy/Him/He////Likes Apples//Coder //
—-
Go to Codin[co
- medians
- Scratcher
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?>
Medians bamboozled by 3.0 (version 3.0): https://scratch-mit-edu.ezproxy.canberra.edu.au/projects/979822351/
hi875230163394: You're similar to valve in that you both hate a certain number…
Scratch 0.x, 1.x, 2.x, 3.x and LogoBlocks Archives
Bamboozlement: https://scratch-mit-edu.ezproxy.canberra.edu.au/studios/33739789
Describe favorite topics: https://scratch-mit-edu.ezproxy.canberra.edu.au/studios/35764610/
SP community won against Fandom :P
Years on internet: 16 (very close to 16)
medians: Oh god not this utc - 12 thing again..
Fun_Cupcake_i81: What, were you expecting not to see the utc - 12 thing again? THE UTC - 12 THIGN ALWAYS RETURNS. ALWAYS.
medians: I knew it would happen. I was the one who started it last year.
Fun_Cupcake_i81: Well then if you didn't want it back maybe you need to time travel to last year and fix that
Oh wait if you could time travel I think we all know exactly when you would go-
user1: That picture is from 2.0. Now he’s at my house and is my pet.
user2: But this is medians we're talking about, so “from 2.0” can mean the same thing as “from five seconds ago”.
Detect Scratch version here
My other accounts: @selfexplanatory @modesties @chaircard @fireflyhero @dividendyield @colloids @radians @skeuamorphism @dihectogon @anglebisector @aau- @EditBlockColors @AdamantOrb @MoongeistBeam @festively @Ampharos_ @straightforwardness @interchangeably
i trolled redcat LOL
if you see this
{what method did you use::control hat
answer on profile ::motion
} ::operators
;
- CrSb0001
- Scratcher
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.ezproxy.canberra.edu.au/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)
while <(boing)>Stack Overflow: CrSb0001
end
Youtube: CrSb0001
Instagram: CrSb0001
when @stopSign clicked :: hat :: events
- 10data10
- Scratcher
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.ezproxy.canberra.edu.au/projects/719996268/
And this one from WildTraces showing how clones can detect distance to other clones and move away.
https://scratch-mit-edu.ezproxy.canberra.edu.au/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.ezproxy.canberra.edu.au/projects/719996268/
And this one from WildTraces showing how clones can detect distance to other clones and move away.
https://scratch-mit-edu.ezproxy.canberra.edu.au/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.