Discuss Scratch
- Discussion Forums
- » Suggestions
- » Workarounds to frequently suggested blocks
- SuperRyn
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
Another piece of handy code: When mouse clicked
when green flag clicked
forever
wait until <mouse down?>
wait until <not <mouse down?>>
broadcast [stuff and things]
end
“I'm too busy to update, you are too busy to update, everyone is too busy to update.” - me 2020
Generation 382: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
I'm sig the signature! Wait… is that a wild kumqu-
(------|- >:|)That's Medium Timmy, he tries to defend aganist evil kumquats, but often fails.
- Computer_Fizz
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
This has been suggseted a lot and the workaround is sturdy. I'm considering adding it, but the workaround may be too obvious. Is there any reasons it may be worth adding despite that? Workaround for mouse up<not <mouse down?>>
I don't think this is suggested that often and the code you provide is also very inconsistent. Another piece of handy code: When mouse clickedwhen green flag clicked
forever
wait until <mouse down?>
wait until <not <mouse down?>>
broadcast [stuff and things]
end
- eric99343
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
this is a sensing block that was suggested that the scratch team should reject, because it has a workaround.
the ask and not wait block. The workaround is shown below.
_____________________________________________________________________________________________
ask []::sensing
the ask and not wait block. The workaround is shown below.
_____________________________________________________________________________________________
when green flag clicked
broadcast [ v]
move () steps
when I receive [ v]
ask [] and wait
Last edited by eric99343 (Feb. 12, 2020 14:01:31)
- Beamy68
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
Just because it has a workaround, doesn't mean the ST should reject it this is a sensing block that was suggested that the scratch team should reject, because it has a workaround.ask []::sensing
the ask and not wait block. The workaround is shown below.
_____________________________________________________________________________________________when green flag clicked
broadcast [ v]
move () steps
when I receive [ v]
ask [] and wait
Post Goal:
Motion::motion
Looks::looks
Sound::sound
Pen::pen
Events::events
Control::control
Sensing::sensing
Operators::operators
Variables::variables
List::list
More Blocks::custom
bemy
- Beamy68
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
What??? It wasn't even pixelyoshi who started it..? C'mon pay attentionI do agree with you, PixelYoshi, but please stay on topic, thx.how is that cringe? it's just math.Yeah but that’s kinda cringe nglMotion :: motion hat———————————————————–move up ( number ) steps :: motioncan be recreated with the following code:set [direction v] to ( direction )
point in direction ( 0 v)
move ( number ) steps
point in direction ( direction :: variables )———————————————————–point towards x: ( WantedX ) y: ( WantedY ) :: motioncan be recreated by moving a sprite to that x and y then pointing toward that sprite. it can also be recreated with the following (more complicated) code:set [deltax v] to ( ( WantedX ) - ( x position ) )
set [deltay v] to ( ( WantedY ) - ( y position ) )
if <not < ( deltay ) = ( 0 )> > then
if < ( deltay ) > ( 0 ) > then
point in direction ( [atan v] of ( ( deltax ) / ( deltay ) )
else
point in direction ( ([atan v] of ( ( deltax ) / ( deltay ) ) ) + (180) )
end
else
if ( ( deltax ) > ( 0 ) ) then
point in direction ( 90 )
else
point in direction ( -90 )
endbounce :: motioncan be recreated with the following code:point in direction ( ( direction ) - ( 180 ) )
Just use python lol
Post Goal:
Motion::motion
Looks::looks
Sound::sound
Pen::pen
Events::events
Control::control
Sensing::sensing
Operators::operators
Variables::variables
List::list
More Blocks::custom
bemy
- 12349999eeeeeee9S99
- Scratcher
51 posts
Workarounds to frequently suggested blocks
but he meant pixelyoshi, come on man, pay attentionWhat??? It wasn't even pixelyoshi who started it..? C'mon pay attentionI do agree with you, PixelYoshi, but please stay on topic, thx.how is that cringe? it's just math.Yeah but that’s kinda cringe nglMotion :: motion hat———————————————————–move up ( number ) steps :: motioncan be recreated with the following code:set [direction v] to ( direction )
point in direction ( 0 v)
move ( number ) steps
point in direction ( direction :: variables )———————————————————–point towards x: ( WantedX ) y: ( WantedY ) :: motioncan be recreated by moving a sprite to that x and y then pointing toward that sprite. it can also be recreated with the following (more complicated) code:set [deltax v] to ( ( WantedX ) - ( x position ) )
set [deltay v] to ( ( WantedY ) - ( y position ) )
if <not < ( deltay ) = ( 0 )> > then
if < ( deltay ) > ( 0 ) > then
point in direction ( [atan v] of ( ( deltax ) / ( deltay ) )
else
point in direction ( ([atan v] of ( ( deltax ) / ( deltay ) ) ) + (180) )
end
else
if ( ( deltax ) > ( 0 ) ) then
point in direction ( 90 )
else
point in direction ( -90 )
endbounce :: motioncan be recreated with the following code:point in direction ( ( direction ) - ( 180 ) )
Just use python lol
when green flag clicked
forever
say [DESTROY THE GACHAS!!] for (2) secs
point towards [ gacha]
broadcast [ clear gacha]
end
- kittiesrule247
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
I understand there is a mouse down block<mouse down?>but why can't there be a mouse up block?
im pretty sure other people who want to make projects were people can draw want they want would appreciate it because it would make there projects code easier to make.
The workaround to mouse up? is:forever
if <mouse down?> then
wait until <not <mouse down?>>
broadcast [run code v]
end
end
when I receive [run code v]
. . .
<not <mouse down?>>
LGBTQIAPNDO+ PRIDE
- PixelYoshi
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
i wasn't really off topic, but you guys have gotten of topic so lets just end this…but he meant pixelyoshi, come on man, pay attentionWhat??? It wasn't even pixelyoshi who started it..? C'mon pay attention I do agree with you, PixelYoshi, but please stay on topic, thx.
- no8pupil
- Scratcher
72 posts
Workarounds to frequently suggested blocks
Welli wasn't really off topic, but you guys have gotten of topic so lets just end this…but he meant pixelyoshi, come on man, pay attentionWhat??? It wasn't even pixelyoshi who started it..? C'mon pay attention I do agree with you, PixelYoshi, but please stay on topic, thx.
- stay on topic
and ɦɑⱱe ɑ ɓowɭ ɱɾ sqʊɪɗwɑrɖ
like::control hat
heart::motion
follow::list
likes (bbc (alba::stack events)::stack motion)::pen
loves the IPA::operators
friendly::cap
- no8pupil
- Scratcher
72 posts
Workarounds to frequently suggested blocks
This may not be a suggestion but, can anyone give me a workaround for these BYOB blocks?
report []::cap controland
(JavaScript function ( [] @addInput ) { [] }::operators)
run ((block::stack grey)::ring grey)::control
like::control hat
heart::motion
follow::list
likes (bbc (alba::stack events)::stack motion)::pen
loves the IPA::operators
friendly::cap
- PixelYoshi
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
lol now your off topicWelli wasn't really off topic, but you guys have gotten of topic so lets just end this…but he meant pixelyoshi, come on man, pay attentionWhat??? It wasn't even pixelyoshi who started it..? C'mon pay attention I do agree with you, PixelYoshi, but please stay on topic, thx.
- stay on topic
and ɦɑⱱe ɑ ɓowɭ ɱɾ sqʊɪɗwɑrɖ
- no8pupil
- Scratcher
72 posts
Workarounds to frequently suggested blocks
bish disgustlol now your off topicWelli wasn't really off topic, but you guys have gotten of topic so lets just end this…but he meant pixelyoshi, come on man, pay attentionWhat??? It wasn't even pixelyoshi who started it..? C'mon pay attention I do agree with you, PixelYoshi, but please stay on topic, thx.
- stay on topic
and ɦɑⱱe ɑ ɓowɭ ɱɾ sqʊɪɗwɑrɖ
like::control hat
heart::motion
follow::list
likes (bbc (alba::stack events)::stack motion)::pen
loves the IPA::operators
friendly::cap
- kjtv9000new
- Scratcher
37 posts
Workarounds to frequently suggested blocks
< sound [ v] playing? :: sound>
Last edited by kjtv9000new (Feb. 22, 2020 18:33:21)
This message has been approved by me! :: custom hat
if <i detect [evil kumquats v] :: sensing> then
blow up evil kumquats :: looks
else
say [(insert good joke routine here)] for (2) secs
end
always be cool guys.~(˘▾˘~) This is SiggyProt. He can take down bad guys.
PIE DRAGONS!!!!!!!!!! (it only eats pies)My website
- kjtv9000new
- Scratcher
37 posts
Workarounds to frequently suggested blocks
<[ v] recieved? :: events>
This message has been approved by me! :: custom hat
if <i detect [evil kumquats v] :: sensing> then
blow up evil kumquats :: looks
else
say [(insert good joke routine here)] for (2) secs
end
always be cool guys.~(˘▾˘~) This is SiggyProt. He can take down bad guys.
PIE DRAGONS!!!!!!!!!! (it only eats pies)My website
- kjtv9000new
- Scratcher
37 posts
Workarounds to frequently suggested blocks
repeat for (...) seconds{
...
} @loopArrow :: control
Can you make a workaround for that?
Last edited by kjtv9000new (Feb. 22, 2020 18:47:04)
This message has been approved by me! :: custom hat
if <i detect [evil kumquats v] :: sensing> then
blow up evil kumquats :: looks
else
say [(insert good joke routine here)] for (2) secs
end
always be cool guys.~(˘▾˘~) This is SiggyProt. He can take down bad guys.
PIE DRAGONS!!!!!!!!!! (it only eats pies)My website
- no8pupil
- Scratcher
72 posts
Workarounds to frequently suggested blocks
Firstrepeat for (...) seconds{
...
} @loopArrow :: control
Can you make a workaround for that?
when green flag clickedThen
set [time v] to [true]
wait (number::grey) sec
set [time v] to [false]
when green flag clicked
repeat until <(time) = [false]>
...
end
like::control hat
heart::motion
follow::list
likes (bbc (alba::stack events)::stack motion)::pen
loves the IPA::operators
friendly::cap
- Computer_Fizz
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
< sound [ v] playing? :: sound>
That can be worked around like this:
set [MeowPlaying v] to [true]
play sound [meow v] until done
set [MeowPlaying v] to [false]
I am not sure whether or not this is suggested enough to be at the main front, but I'll be thinking about it the next few days.
<[ v] recieved? :: events>
This is hard to work around because nobody can agree on how it would work (i.e. only if it's actively being received immediately, or has been broadcast at any point, or since last broadcast, etc…) Can you be more specific?
repeat for (...) seconds{
...
} @loopArrow :: control
Can you make a workaround for that?
This can be done with the timer, but it's tricky in case of stuff like this
repeat for (1) seconds{
wait (2) secs
} @loopArrow :: control
In this case, would it cut off the scripts if it took longer than the amount of time, or just finish them and only not do the next round?
Last edited by Computer_Fizz (Feb. 22, 2020 20:01:24)
- chiru3
- Scratcher
41 posts
Workarounds to frequently suggested blocks
change y by ()
is a workaround for
move up () steps
- Hopeijay
- Scratcher
90 posts
Workarounds to frequently suggested blocks
I made it a sound block for a reason, its supposed to be the speed of the sound without the pitch changingis there a workaround for this:set speed to (...):: sound
What do you want this block to do to what?
If you are talking about setting the speed of the sprite, this may help:set speed to (...):: #7238a8define set speed to (speed)
forever
move (speed) steps
end
Sorry, I missed that, the correct term would be tempo but sadly there is no way to change the tempo of the sound without changing the pitch. Sorry about that.
Last edited by Hopeijay (Feb. 23, 2020 15:23:53)
Have your hands not been washed in the last 5 hours? CALL 1-800-GOTOTHESINKANDWASHYOURHANDS now, to keep COVID-19 away! That's 1-800-GOTOTHESINKANDWASHYOURHANDS Thank you!
- Beamy68
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
repeat for (...) seconds{
...
} @loopArrow :: control
Can you make a workaround for that?
By-far the easiest workaround for this is:
repeat (seconds)
...
wait (1) secs
end
OR (because I know people are gonna argue)
repeat until <(seconds) = [0]>
repeat (1)
...
change [seconds v] by (-1)
end
end
Last edited by Beamy68 (Feb. 24, 2020 02:59:24)
Post Goal:
Motion::motion
Looks::looks
Sound::sound
Pen::pen
Events::events
Control::control
Sensing::sensing
Operators::operators
Variables::variables
List::list
More Blocks::custom
bemy