Discuss Scratch
- Discussion Forums
- » Suggestions
- » Scratch Workaround Guide VII
- MythosLore
-
1000+ posts
Scratch Workaround Guide VII
I’m guessing they did this to bring it above all of the closed ones.you cant bump stikies Bump
- cookieclickerer33
-
1000+ posts
Scratch Workaround Guide VII
stikeys dont get bumped they always stay at the same positionI’m guessing they did this to bring it above all of the closed ones.you cant bump stikies Bump
- MythosLore
-
1000+ posts
Scratch Workaround Guide VII
There’s an order that the stickies go in, too.stikeys dont get bumped they always stay at the same positionI’m guessing they did this to bring it above all of the closed ones.you cant bump stikies Bump
- PaperMarioFan2022
-
1000+ posts
Scratch Workaround Guide VII
Nah, it's a sticky which can't be bumped (only suggestions as long as they don't cause disruption to the community I heard). super dead forum?
- 96498cb
-
100+ posts
Scratch Workaround Guide VII
✽ wait until I receive message1wait… using this will have the same effect as just
Use a variable to keep track of whether or not you’ve received the broadcast. (Choose “for this sprite only” when you create it.) The important thing is that you reset it right when you start waiting - that way you’ll only stop waiting once you receive the broadcast again, if you’ve received it before!set [have I received message1? v] to [false]
wait until <(have I received message1?) = [true]>
say [I received it!] for (1) secs
when I receive [message1 v]
set [have I received message1? v] to [true]
<(have I received message1?) = [true]>
- co0lcr34t10ns
-
1000+ posts
Scratch Workaround Guide VII
2D Lists, a rejected suggestion, can easily recreated with not many blocks. At least, this is how I think they work, I know jack squat about anything other than Scratch lol
set [sublist v] to (item (sublist 1 v) of [2d list v] :: list)
hide list [2d list v]
show list (sublist)
do what you want with the other list
Last edited by co0lcr34t10ns (Nov. 15, 2023 23:49:28)
- Tris_das_Einhorn
-
100+ posts
Scratch Workaround Guide VII
Hey! I'd like to suggest a workaround for non-English keyboard characters which can't be detected by the
Because only the plain 26 English letters are in the dropdown, to detect characters with diacritics (ä,ô,í,ű, etc.), non-latin characters (α,ж,ß,ð, etc.), and special characters (%,€,?, etc.) the following workaround can be used:
It's much quicker than the known ascii workaround and means that projects with keyboard input can be used by Scratchers all around the world. Please consider adding it to this list!
<key [ v] pressed?>block. It's a super easy workaround but might be really useful to Scratchers who make projects in languages other than English!
Because only the plain 26 English letters are in the dropdown, to detect characters with diacritics (ä,ô,í,ű, etc.), non-latin characters (α,ж,ß,ð, etc.), and special characters (%,€,?, etc.) the following workaround can be used:
<key (join [] [special character]) pressed?>
It's much quicker than the known ascii workaround and means that projects with keyboard input can be used by Scratchers all around the world. Please consider adding it to this list!
Last edited by Tris_das_Einhorn (Nov. 19, 2023 08:57:29)
- TP2222
-
100+ posts
Scratch Workaround Guide VII

define random costumeHee hee
repeat (pick random (1) to (55))
next costume
end

- undeterminstic
-
1000+ posts
Scratch Workaround Guide VII
stop spammingdefine random costumeHee hee
repeat (pick random (1) to (55))
next costume
end
- MohammedHayyan
-
26 posts
Scratch Workaround Guide VII
…
✽ boolean: “I receive (message)”
…
You might be right, but there is a way. Here's how it works:
when gf clicked::cat // Whatever sprite you want
set [message1 v] to [0] // In computing, 0 means it's a false condition
broadcast[message1 v]
when I receive[message1 v]:: cat // In the same sprite or another sprite
set [message1 v] to [1] // In computing, 1 means it's a true condition
when gf clicked:: cat
forever
...
. . .{
}::grey
. . .{
}::grey
. . .{
} . . .{
}::grey
if<(message1)=(1)>then
...
else
if<<not<(message1)=(1)>>and<(message1)=(0)>>then
...
end
end
...
...
end
Last edited by MohammedHayyan (Nov. 20, 2023 13:28:21)
- JelliBeens-1
-
71 posts
Scratch Workaround Guide VII
Another workaround:
define shown?
set [ v] to [1]
create clone of [myself v]
set [result v] to <touching [myself v] ?>
set [ v] to [0]
when I start as a clone
if <() = [1]> then
delete this clone
else
. . .
end
- co0lcr34t10ns
-
1000+ posts
Scratch Workaround Guide VII
He's not spamming, that's an actual suggestionstop spammingdefine random costumeHee hee
repeat (pick random (1) to (55))
next costume
end
- 1080GBA
-
500+ posts
Scratch Workaround Guide VII
(#3)suggestion:
…
✽ rotate around sprite: (thanks, @hill_walker123!)
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 [distance v] to (distance to (sprite))
set [direction before custom block ran v] to (direction)
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)
…
define rotate (degrees) degrees around x:[x] y:[y](took me quite a bit of time to type all this thou)
set [distance v] to ([sqrt v] of ((((x)-(x position))*((x)-(x position)))+(((y)-(y position))*((y)-(y position))))
set [original direction v] to (direction) //i just call it 'od'
point in direction (([atan v] of (((x) - (x position)) / ((y) - (y position))))+(<(y) < (y position)>*[180]))
set x to ((x) + ((distance :: variables) * ([sin v] of (((direction) + (180)) + (degrees)))
set y to ((y) + ((distance :: variables) * ([cos v] of (((direction) + (180)) + (degrees)))
point in direction ((original direction)+(degrees)) //add (degrees)-> also rotate sprite
tell me if anything is wrong
fancy mode edit:
define rotate (degrees) degrees around x:[x] y:[y]
set [distance v] to (distance to x:(x) y:(y)::sensing)
set [original direction v] to (direction) //i just call it 'od'
point towards x:(x) y:(y)::motion
set x to ((x) + ((distance :: variables) * ([sin v] of (((direction) + (180)) + (degrees)))
set y to ((y) + ((distance :: variables) * ([cos v] of (((direction) + (180)) + (degrees)))
point in direction ((original direction)+(degrees)) //add (degrees)-> also rotate sprite
Last edited by 1080GBA (Dec. 24, 2023 05:08:45)
- 1080GBA
-
500+ posts
Scratch Workaround Guide VII
define wait until next secondbefore you think this is just a ‘wait () second’ block, its not.
for example, the project started when the (current ) is 15, but its actually 15.2 . this block will make this code wait 0.8 seconds, aka wait until current second exactly equals 16. workaround:
define wait until next second
set [second of last frame v] to (current [second v])
repeat until <not<(second of last frame)=(current [second v])>> j{
set [second of last frame v] to (current [second v])}::control loop n//no wait until screen refresh
- zeer121
-
94 posts
Scratch Workaround Guide VII
Workaround for the:
Block:
when this sprite not clicked :: events hat
Block:
when green flag clicked
forever
if <not <touching [mouse-pointer v] ?>> then
say [YOU DID NOT CLICK ME] for (2) secs
end
end
Last edited by zeer121 (Jan. 2, 2024 11:16:44)
- NotK3ndricAlt
-
1000+ posts
Scratch Workaround Guide VII
Actually: Workaround for the:when this sprite not clicked :: events hat
Block:Snipped block!
when green flag clicked
forever
if <not <<touching [mouse-pointer v] ?> and <mouse down?>>> then
say [YOU DID NOT CLICK ME] for (0.1) secs // tells the computer to check everytime if the sprite is not being clicked
end
end
Last edited by NotK3ndricAlt (Jan. 2, 2024 11:17:10)
- zeer121
-
94 posts
Scratch Workaround Guide VII
Another workaround:define shown?
set [ v] to [1]
create clone of [myself v]
set [result v] to <touching [myself v] ?>
set [ v] to [0]
when I start as a clone
if <() = [1]> then
delete this clone
else
say [Hi] for (2) secs
end
- TheEpikGamer211
-
1000+ posts
Scratch Workaround Guide VII
uhh, why are you quoting something without responding? I'm not sure if its allowed?-snip-