Discuss Scratch
- Discussion Forums
- » Suggestions
- » Scratch Workaround Guide VII
- Little_Mittle12345
-
100+ posts
Scratch Workaround Guide VII
Method 3 (real workaround)Such as? Could you add a workaround for “when stop sign clicked”
-
There are two methods (with reset timer and without reset timer).
Method 1 (thanks to the Scratch Wiki)when green flag clicked
forever
reset timer
end
when [timer v] > (0.1)
...
Method 2when green flag clicked
forever
set [timer v] to (timer)
end
when [timer v] > (timer:: variables)
...
when green flag clicked
forever
reset timer
end
when [timer v] > (0.1)
do something :: #080808
when [timer v] > (0.1)
forever
reset timer
- -ErrorPurpl_157
-
100+ posts
Scratch Workaround Guide VII
Could you add a workaround for “when stop sign clicked”
when green flag clicked
forever
set [Stop v] to ((Timer)+[1]) :: variables
end
when [Timer v] > (Stop)
…
Last edited by -ErrorPurpl_157 (Oct. 15, 2022 02:56:14)
- Little_Mittle12345
-
100+ posts
Scratch Workaround Guide VII
workaround for
<this sprite holding?:: sensing
when this sprite clicked
set [l v] to [1]
wait until <not <mouse down?>
set [l v] to (0)
<(l) = (1)>// sprite holding?
Last edited by Little_Mittle12345 (Oct. 26, 2022 21:11:42)
- randomguy3513
-
1000+ posts
Scratch Workaround Guide VII
Actually, that doesn't work you need a Not <> boolean workaround for<this sprite clicked?:: sensingwhen this sprite clicked
set [l v] to [1]
wait until <mouse down?>
set [l v] to (0)
<(l) = (1)>// sprite clicked?
- Little_Mittle12345
-
100+ posts
Scratch Workaround Guide VII
workaround for<this sprite clicked?:: sensingwhen this sprite clicked
set [l v] to [1]
wait (0) secs
set [l v] to (0)
<(l) = (1)>// sprite clicked?
Last edited by Little_Mittle12345 (Oct. 26, 2022 21:10:52)
- modesties
-
100+ posts
Scratch Workaround Guide VII
(backdrop count ::looks)Workaround:
define backdrop countCan do something similar if you want the number of costumes
set [save v] to (backdrop [number v] ::looks)
switch backdrop to (join [0] []) //second input is blank
set [backdrops v] to (backdrop [number v] ::looks)
switch backdrop to (save)
- 1080GBA
-
500+ posts
Scratch Workaround Guide VII
i was competing for the 6th when a dude name Nezon took it and did nothing then gave it to this guy. the former guides' format was untidy and was triggering me as a perfectionist. Yeah. So i guess i will have to wait a year or two for the next takeover Can I make the 8th workaround guide?
i did that already(backdrop count ::looks)Workaround:define backdrop countCan do something similar if you want the number of costumes
set [save v] to (backdrop [number v] ::looks)
switch backdrop to (join [0] []) //second input is blank
set [backdrops v] to (backdrop [number v] ::looks)
switch backdrop to (save)
Last edited by 1080GBA (Nov. 8, 2022 15:23:53)
- 1080GBA
-
500+ posts
Scratch Workaround Guide VII
COME ON BRUH ITS NOT THAT COMPLICATED workaround for<this sprite holding?:: sensingwhen this sprite clicked
set [l v] to [1]
wait until <not <mouse down?>
set [l v] to (0)
<(l) = (1)>// sprite holding?
<this sprite holding?::sensing>dont overthink it brooooooooo
<<touching [mouse-pointer v] ?> and <mouse down?>>
- 1080GBA
-
500+ posts
Scratch Workaround Guide VII
Could you add a workaround for “when stop sign clicked”when green flag clicked
forever
set [Stop v] to ((Timer)+[1]) :: variables
end
when [Timer v] > (Stop)
…
when [timer v] > (0)
reset timer //nothing is allowed to be attached below
when [timer v] > (0)
do something::#888888
- Little_Mittle12345
-
100+ posts
Scratch Workaround Guide VII
actually most people think thats the workaround it doesent work perfectlyCOME ON BRUH ITS NOT THAT COMPLICATED workaround for<this sprite holding?:: sensingwhen this sprite clicked
set [l v] to [1]
wait until <not <mouse down?>
set [l v] to (0)
<(l) = (1)>// sprite holding?<this sprite holding?::sensing>dont overthink it brooooooooo
<<touching [mouse-pointer v] ?> and <mouse down?>>
- 1080GBA
-
500+ posts
Scratch Workaround Guide VII
wrongSuch as? Could you add a workaround for “when stop sign clicked”
-
There are two methods (with reset timer and without reset timer).
Method 1 (thanks to the Scratch Wiki)when green flag clicked
forever
reset timer
end
when [timer v] > (0.1)
...
Method 2when green flag clicked
forever
set [timer v] to (timer)
end
when [timer v] > (timer:: variables)
...
your code will start as soon as the programme starts
you're basically doing
When project is running::events hat
- 1080GBA
-
500+ posts
Scratch Workaround Guide VII
oh ‘this sprite ’ holding whatactually most people think thats the workaround it doesent work perfectlyCOME ON BRUH ITS NOT THAT COMPLICATED workaround for<this sprite holding?:: sensingwhen this sprite clicked
set [l v] to [1]
wait until <not <mouse down?>
set [l v] to (0)
<(l) = (1)>// sprite holding?<this sprite holding?::sensing>dont overthink it brooooooooo
<<touching [mouse-pointer v] ?> and <mouse down?>>
- _nix
-
1000+ posts
Scratch Workaround Guide VII
I added a workaround for “mouse dragging this sprite”! That's the name I use for what you guys have been calling “this sprite holding” 
Since getting it to work with the “set drag mode: draggable” block from the Sensing category was kinda tricky, I tried a few different approaches before settling on one which was more complicated but (as far as I can tell) always works. If you wanna check out those other methods and all the details, I made a demo project showing them off: Drag detection methods
Thanks for the discussion about this block!

Since getting it to work with the “set drag mode: draggable” block from the Sensing category was kinda tricky, I tried a few different approaches before settling on one which was more complicated but (as far as I can tell) always works. If you wanna check out those other methods and all the details, I made a demo project showing them off: Drag detection methods
Thanks for the discussion about this block!
- INSERT-USER_NAME
-
1000+ posts
Scratch Workaround Guide VII
I found a workaround for the nonexistent when <> block. I'm not sure where it would go, but I'm putting it here just in case. This is the workaround:
when [timer v] > ((timer) - <key [space v] pressed?>
- yavuz61035
-
500+ posts
Scratch Workaround Guide VII
there needs to be a minor change here:
200 is actually red and 0 has no effect
you can see this by how white tints red slightly
200 is back to normal, so 200 and 0 make the same result. You can use the “mod” operators block to keep the value within a specific range, as long as you know at what value it loops……Remember that some effects, like color, “loop” at a certain point - 100 is completely the opposite colors,
200 is actually red and 0 has no effect
you can see this by how white tints red slightly
- _nix
-
1000+ posts
Scratch Workaround Guide VII
Oh wow, this is interesting—I never noticed before. I should have checked that! It looks like the “color” effect overall tints anything, including white, with the color specified. Zero is just the special “disable me” value: it WOULD be the same effect as 200, which you can see by how 200 = 400 = 600 (and 50 = 250 = 450 = 650) etc. I'll see if I can work a note about this in. Thanks! there needs to be a minor change here:200 is back to normal, so 200 and 0 make the same result. You can use the “mod” operators block to keep the value within a specific range, as long as you know at what value it loops……Remember that some effects, like color, “loop” at a certain point - 100 is completely the opposite colors,
200 is actually red and 0 has no effect
you can see this by how white tints red slightly
- _nix
-
1000+ posts
Scratch Workaround Guide VII
Okay, this is actually really cool. :D I found a workaround for the nonexistent when <> block. I'm not sure where it would go, but I'm putting it here just in case. This is the workaround:when [timer v] > ((timer) - <key [space v] pressed?>
I've added it, with credits, to the top of the Events & Control section! Since it's the first custom Events block. Thank you!
- INSERT-USER_NAME
-
1000+ posts
Scratch Workaround Guide VII
Alright, you're welcome!Okay, this is actually really cool. :D I found a workaround for the nonexistent when <> block. I'm not sure where it would go, but I'm putting it here just in case. This is the workaround:when [timer v] > ((timer) - <key [space v] pressed?>
I've added it, with credits, to the top of the Events & Control section! Since it's the first custom Events block. Thank you!
Last edited by INSERT-USER_NAME (Nov. 16, 2022 22:41:31)
- Discussion Forums
- » Suggestions
-
» Scratch Workaround Guide VII