Discuss Scratch
- Discussion Forums
- » Suggestions
- » Workarounds to frequently suggested blocks
- NxNmultiply
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
for{a::grey}<b::grey>{c::grey}then{
...
}::control
a::grey
while<b::grey>then{
...
c::grey
}::control
Example:
[double v] [b] = (1)::variables
for{[double v] [a] = (0)::variables}\ <(a)\<(16)>\ {[a]++::variables}then{
[b] *= (3) ::variables
}::control
set [b v] to [1]
set [a v] to [0]
while<(a)\<[16]>then{
set [b v] to ((b)*(3))
change [a v] by (1)
}::control
- -LekkerGames-
- Scratcher
67 posts
Workarounds to frequently suggested blocks
It can also be recreated like this:Events :: events hatwhen ( :: obsolete) clicked :: events hatcan be recreated with the following code:
...when @greenFlag 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)
...
when i wake up::hat , events
if <(year) = (2020)> then
go back to bed::motion
else
think [I am happy it is not 2020] for (2) secs
go back to bed::motion
end
- Super_Scratch_Bros20
- Scratcher
1000+ posts
Workarounds to frequently suggested blocks
It can also be recreated like this:Events :: events hatwhen ( :: obsolete) clicked :: events hatcan be recreated with the following code:
...when @greenFlag 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)
...
No, actually. The timer resets once the green flag starts. So, it would have to be a larger value than zero once the green flag is pressed. In other words, once the green flag would be pressed, that script would run, not when the stop sign is clicked.
- Hopeijay
- Scratcher
90 posts
Workarounds to frequently suggested blocks
for{a::grey}<b::grey>{c::grey}then{
...
}::controla::grey
while<b::grey>then{
...
c::grey
}::control
Example:[double v] [b] = (1)::variables
for{[double v] [a] = (0)::variables}\ <(a)\<(16)>\ {[a]++::variables}then{
[b] *= (3) ::variables
}::controlset [b v] to [1]
set [a v] to [0]
while<(a)\<[16]>then{
set [b v] to ((b)*(3))
change [a v] by (1)
}::control
You can probably do the ‘while’ block with:
set [b v] to [1]
set [a v] to [0]
repeat until <not<(a)\<[16]>>then{
set [b v] to ((b)*(3))
change [a v] by (1)
}::control
Hope this helps!
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!
- Hopeijay
- Scratcher
90 posts
Workarounds to frequently suggested blocks
It can also be recreated like this:Events :: events hatwhen ( :: obsolete) clicked :: events hatcan be recreated with the following code:
...when @greenFlag 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)
...
No, actually. The timer resets once the green flag starts. So, it would have to be a larger value than zero once the green flag is pressed. In other words, once the green flag would be pressed, that script would run, not when the stop sign is clicked.
Actually no, I tested it out and it works just fine! -LekkerGames- is correct, that does also work.
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!
- Boomer001
- Scratcher
1000+ posts
Workarounds to frequently suggested blocks
There is a lot easier way to do that:bounce :: motioncan be recreated with the following code:point in direction ( ( direction ) - ( 180 ) )
turn cw (180) degrees
::::::::: :::::::: :::::::: :::: :::: :::::::::: ::::::::: ::::::: ::::::: ::: :+: :+: :+: :+: :+: :+: +:+:+: :+:+:+ :+: :+: :+: :+: :+: :+: :+: :+:+: +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+:+ +:+ +:+ +:+ +:+ +:+ :+:+ +:+ :+:+ +:+ +#++:++#+ +#+ +:+ +#+ +:+ +#+ +:+ +#+ +#++:++# +#++:++#: +#+ + +:+ +#+ + +:+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+# +#+ +#+# +#+ +#+ #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# ######### ######## ######## ### ### ########## ### ### ####### ####### #######
- Hopeijay
- Scratcher
90 posts
Workarounds to frequently suggested blocks
There is a lot easier way to do that:bounce :: motioncan be recreated with the following code:point in direction ( ( direction ) - ( 180 ) )turn cw (180) degrees
Or, for a more realistic bounce:
point in direction ([0] - (direction))
turn cw [180] degrees
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!
- FireEmeraldAnimator
- Scratcher
31 posts
Workarounds to frequently suggested blocks
Is there a way to work around a repeat for ( ) seconds loop?
Last edited by FireEmeraldAnimator (May 14, 2020 00:42:43)
- BestUsernameSoFar
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
Yes, do this. Is there a way to work around a repeat for ( ) seconds loop?
Create a variable
(seconds)Make this variable set to zero and then always change every one second.
set [seconds v] to (0)After that, do this:
forever
wait (1) secs
change [seconds v] by (1)
end
repeat until <(seconds)= (5)>
set [seconds v] to (0)
. . .
end
Who am I?
Hi I'm BestUsernameSoFar, but you can call me Besty.
(•~•::#30D5C8) // this is Busf, my pet scratchblock!
Please press Ctrl + Shift + Down to see the rest of my signature
or if you're on mobile simply highlight it and scroll down.
love of God that is in Christ Jesus our Lord.For I am convinced that neither death nor life, neither angels nor demons, neither the present nor the future, nor any powers, neither height nor depth, nor anything else in all creation, will be able to separate us from the
I am an Scratcher that makes Games and Animations!
√ Minecraft
X Roblox
X Fortnite
√ Animal Crossing
√ Mario Galaxy
X Stardew Valley
√ Star Wars: Battlefront
- FireEmeraldAnimator
- Scratcher
31 posts
Workarounds to frequently suggested blocks
Okay, thanks!Yes, do this. Is there a way to work around a repeat for ( ) seconds loop?
Create a variable(seconds)Make this variable set to zero and then always change every one second.set [seconds v] to (0)After that, do this:
forever
wait (1) secs
change [seconds v] by (1)
endrepeat until <(seconds)= (5)>
set [seconds v] to (0)
. . .
end
- Monniasza_spzoo
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
List :: list hat( item ( last v ) of [ list v] )can be recreated with the following code:( item ( length of [ list v] ) of [ list v] )
It's not only way.
(item (join [la] [st]) of [list v] :: list)
- The_King_In_Yellow
- Scratcher
15 posts
Workarounds to frequently suggested blocks
for those 1984 fans out there,Operators :: operators hat———————————————————–< < . . . > xor < . . . > :: operators>can be recreated with the following code:< not < < . . . > = < . . . > > >———————————————————–< true :: operators>can be recreated with the following code:< [1] = [1] >———————————————————–< false :: operators>can be recreated with the following code:< [1] > [2] >———————————————————–( letters ( start ) through ( end :: variables) of ( string ) :: operators)can be recreated with the following code:set [iterator v] to ( start )
set [result v] to []
repeat ( ( ( end :: variables) - ( start ) ) + ( 1 ) )
set [result v] to ( join ( result ) ( letter ( iterator ) of ( string ) ) )
end———————————————————–< ( . . . ) ≥ ( . . . ) :: operators >can be recreated with the following code:< not < ( . . . ) < ( . . . ) > >< ( . . . ) ≤ ( . . . ) :: operators >can be recreated with the following code:< not < ( . . . ) > ( . . . ) > >
<true:: operators>can be recreated as
<([2]+[2])=[5]>
when <forum post is [loaded v]?::sensing> is true::control hatI don't really use Scratch anymore, by the way.
repeat until <([2]+[2])=[5]>
broadcast [welp this is my signature hope u like it v]
end
comment [lol no evil kumquat would dare eat my signature i have Kirby on my side >:D]:: grey stack
- Beamy68
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
Multiple people wrote:
-snip-
1984 fans out there,Please only use constructive criticism and real workarounds. for those<true:: operators>can be recreated as<([2]+[2])=[5]>
Example:
<true::operators>can be recreated as
<((2) + (two)) = [5]>
set [two v] to [3]
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
- JustTbear
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
… or easily withbounce :: motioncan be recreated with the following code:point in direction ( ( direction ) - ( 180 ) )
turn ccw (180) degrees
Last edited by JustTbear (May 23, 2020 08:17:38)
- DaveTheBaby
- Scratcher
15 posts
Workarounds to frequently suggested blocks
I might do that in my mod i wish there was a AM/PM blockif <(current [AM/PM v]) = [PM]> then
say [its late] for (2) secs
end
DAVETHEBABY
def DaveTheBaby {
{
skits::motion
games::sensing
other stuff including ({OS's::#008080}{Filler stuff::#009a00}{Tutorials::sound}@delInput@addInput::ring grey)::control
}::ring grey
}::hat custom
end def::cap custom
- Ace12Best
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
If you made a variable “Speed” (let's say speed is 12)
You would do
Do this
Thanks for all the help I see on this topic it is amazing
You would do
if <key [right] pressed?> thenBut how do you do change x by -Speed
change x by (speed)
end
Do this
change x by ((0) - (speed)I did that on my test account
Thanks for all the help I see on this topic it is amazing
ᴘʟᴇᴀꜱᴇ ᴄʜᴇᴄᴋ ᴏᴜᴛ ꜱᴏᴍᴇ ᴏꜰ ᴍʏ ɢᴀᴍᴇꜱ :ᴅ
Lava Skipper
Dodge It
AND IF YOU'RE A FAN OF MUSIC! Check out my Scratch Music Player
Please follow me I'm Ace12Best I love helping out and I make fun projects for everyone to enjoy
Please check out my website!
- howlepey000
- Scratcher
32 posts
Workarounds to frequently suggested blocks
here is a idea!
when "stop sign picture" clicked
make sure to try this out!: turbo warp
- howlepey000
- Scratcher
32 posts
Workarounds to frequently suggested blocks
can you add this block?
(event)
(event)
when stop sign clicked
make sure to try this out!: turbo warp
- BestUsernameSoFar
- Scratcher
100+ posts
Workarounds to frequently suggested blocks
Please create your own post. Don't nectropost. can you add this block?
(event)when stop sign clicked
Who am I?
Hi I'm BestUsernameSoFar, but you can call me Besty.
(•~•::#30D5C8) // this is Busf, my pet scratchblock!
Please press Ctrl + Shift + Down to see the rest of my signature
or if you're on mobile simply highlight it and scroll down.
love of God that is in Christ Jesus our Lord.For I am convinced that neither death nor life, neither angels nor demons, neither the present nor the future, nor any powers, neither height nor depth, nor anything else in all creation, will be able to separate us from the
I am an Scratcher that makes Games and Animations!
√ Minecraft
X Roblox
X Fortnite
√ Animal Crossing
√ Mario Galaxy
X Stardew Valley
√ Star Wars: Battlefront
- Discussion Forums
- » Suggestions
- » Workarounds to frequently suggested blocks