Discuss Scratch
- Discussion Forums
- » Suggestions
- » Workarounds to Commonly Suggested Blocks
- rollercoasterfan
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
DO NOT SUGGEST BLOCKS HERE! OPEN A NEW TOPIC AFTER READING THIS
Before you suggest a block, read all of this first post.
Think
1. Would this make Scratch more helpful to new scratchers?
If it doesn't, it's probably not a fit for Scratch.
2. Will this help someone learn?
If it doesn't, it also might not fit Scratch.
3. Do the new block(s) bring enough new functionality to justify the added complexity?
If it is very useful, but not very complicated, then there may be a workaround (though sometimes there may not be one)… If it is too complicated, but not very useful, it may not be a good idea because Scratch is meant for an entry-level programming level.
4. Remember, programming is never supposed to be 100% easy.
5. Are there any basic workarounds?
Read on to find basic workarounds to suggested blocks. Scratch can't have every single block, so we have to use workarounds sometimes.
____________________
Please tell me if you have any other commonly suggested blocks with workarounds, and if any of the workarounds here are wrong.
Scratch Team, feel free to edit this and add or change any of these.
Link to wiki for some of these is here, but other ones came from other members of the community.
Before you suggest a block, read all of this first post.
Think
1. Would this make Scratch more helpful to new scratchers?
If it doesn't, it's probably not a fit for Scratch.
2. Will this help someone learn?
If it doesn't, it also might not fit Scratch.
3. Do the new block(s) bring enough new functionality to justify the added complexity?
If it is very useful, but not very complicated, then there may be a workaround (though sometimes there may not be one)… If it is too complicated, but not very useful, it may not be a good idea because Scratch is meant for an entry-level programming level.
4. Remember, programming is never supposed to be 100% easy.
5. Are there any basic workarounds?
Read on to find basic workarounds to suggested blocks. Scratch can't have every single block, so we have to use workarounds sometimes.
____________________
([ v] recieved? ::events)____________________
when green flag clicked
set [var v] to [0]
forever
if <(var) = [1]> then
set [var v] to [0]
...
end
end
when I receive [message v]
set [var v] to [1]
wait (0.25) secs
set [var v] to [0]
when <> ::events hat____________________
...
when [timer v] > (0.1)
forever
if <> then
...
end
end
when costume switches to [costume1 v] ::events hat____________________
when gf clicked
forever
wait until <([costume name v] of [sprite v]) = [costume name here]>
...
end
(clone? ::sensing)____________________
when I start as a clone
set [clone? v] to [true] //variable for this sprite only
(ask in progress? ::sensing)____________________
set [ask v] to [1]
ask [...] and wait
set [ask v] to [0]
(sprite clicked? ::sensing)____________________
when this sprite clicked
set [clicked v] to [1]
wait until <not <<mouse down?> and <touching [mouse-pointer v] ?> >>
set [clicked v] to [0]
(true ::operators)____________________
<[0] = [0]>
(false ::operators)____________________
<[0] = [1]>
([] ≠ [] ::operators)____________________
<not <[] = [ ]>>
([] ≥ [] ::operators)____________________
<not <[] < [ ]>>
([] ≤ [] ::operators)____________________
<not <[] > [ ]>>
(round () to the nearest () ::operators)____________________
((round ((round what) / (to the nearest))) * (to the nearest))
(negate (number)::operators)____________________
((0) - (number))
if <> then ::cstart____________________
else if <> ::celse
end
if <> then
else
if <> then
end
end
forever if <> ::control cstart____________________
end
forever
if <> then
end
end
repeat () secs ::control cstart____________________
end
reset timer //this will only work if you're not using the timer elsewhere in your project
repeat until <(timer) = (number)>
...
end
set [old timer v] to (timer)
repeat until (((timer) - (old timer)) > (seconds ::grey) ) //use this if you are using the timer elsewhere in your project
...
end
previous costume ::looks____________________
switch costume to ((costume #) - (1))
(costume name ::looks)____________________
([costume name v] of [sprite v])
Please tell me if you have any other commonly suggested blocks with workarounds, and if any of the workarounds here are wrong.
Scratch Team, feel free to edit this and add or change any of these.
Link to wiki for some of these is here, but other ones came from other members of the community.
Last edited by rollercoasterfan (Aug. 24, 2015 00:35:09)
- rollercoasterfan
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
~Reserved for future needs~
- rollercoasterfan
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
~Reserved for future needs~
- TheUniversalWorld1
-
Scratcher
100+ posts
Workarounds to Commonly Suggested Blocks
<<touching [mouse-pointer v] ?> and <mouse down?>> // Should have a note saying not exact workaround for "clicking".
Last edited by TheUniversalWorld1 (June 23, 2015 17:40:22)
- DaSpudLord
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
This needs to be stickied.
- Pot-of-Gold
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
This doesThis needs to be stickied.
and may you add the negate block:
negate (number) :: operators reporter
((0) - (number))
- Pot-of-Gold
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
The brodcast message one is wrong its:
when green flag clickedThe actual block after all that is:
set [var v] to [0]
when I receive [message v]
set [var v] to [1]
wait (0.25) secs
set [var v] to [0]
<(var) = [1]> // this is the boolean you use
Last edited by Pot-of-Gold (June 23, 2015 19:15:08)
- Pot-of-Gold
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
Lastly add:
forever if < > :: control cstartAnd:
end
forever
if <> then
end
end
previous costume :: looks
switch costume to ((costume #) - (1))
- seanbobe
-
Scratcher
500+ posts
Workarounds to Commonly Suggested Blocks
The brodcast message one is wrong its:when green flag clickedThen use:
set [var v] to [0]
when I receive [message v]
set [var v] to [1]when green flag clickedThe actual block after all that is:
forever
if <(var) = [1]> then
set [var v] to [0]
...
end
end<(var) = [1]> // this is the boolean you use
no it is
when green flag clicked
set [var v] to [0]
when I receive [... v]
set [var v] to [1]
wait (0.25) secs
set [var v] to [0]
<(var) = [1]>
- thelucariokid
-
Scratcher
100+ posts
Workarounds to Commonly Suggested Blocks
There's a Wiki page for those. You should add those.
- rollercoasterfan
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
There's a Wiki page for those. You should add those.I actually copied these off of the wiki, but I didn't do them all, since some aren't commonly suggested.
- Pot-of-Gold
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
I reported it to be stickied 

- rollercoasterfan
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
I reported it to be stickiedI did probably 20 minutes ago. Thanks though!
- Pot-of-Gold
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
I did it like an hour ago thougoh. Well, the more, the better.I reported it to be stickiedI did probably 20 minutes ago. Thanks though!
Congrats on the sticky btw!
Also, you do not need the forever if var=1 part in the brodcast one
- rollercoasterfan
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
Congrats on the sticky btw!Thanks!
Also, you do not need the forever if var=1 part in the brodcast oneYeah, but otherwise some scratchers might think they can just use the var = 1, but you can't use it on your own.
- Pot-of-Gold
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
oh, but if its a boolean, the workaround should be a booleanCongrats on the sticky btw!Thanks!Also, you do not need the forever if var=1 part in the brodcast oneYeah, but otherwise some scratchers might think they can just use the var = 1, but you can't use it on your own.
- rollercoasterfan
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
It's fine.oh, but if its a boolean, the workaround should be a booleanCongrats on the sticky btw!Thanks!Also, you do not need the forever if var=1 part in the brodcast oneYeah, but otherwise some scratchers might think they can just use the var = 1, but you can't use it on your own.
- ollie_manning
-
Scratcher
44 posts
Workarounds to Commonly Suggested Blocks
I think scratch should add
(I receive [message])
if <(I receive [message])> then
move (10) steps
end
Last edited by ollie_manning (June 24, 2015 18:45:59)
- Pot-of-Gold
-
Scratcher
1000+ posts
Workarounds to Commonly Suggested Blocks
yeahIt's fine.oh, but if its a boolean, the workaround should be a booleanCongrats on the sticky btw!Thanks!Also, you do not need the forever if var=1 part in the brodcast oneYeah, but otherwise some scratchers might think they can just use the var = 1, but you can't use it on your own.
I think scratch should addThis is not a suggestions topic. Its a list to WORKAROUNDS to suggested blocksI receive [message]
- Discussion Forums
- » Suggestions
-
» Workarounds to Commonly Suggested Blocks






