Discuss Scratch

orrinpants
Scratcher
100+ posts

Workarounds to frequently suggested blocks

just to tell you these are the same

go to x: (0) y: (0)
say [hello] for (2) secs


and

me editing wrote:

text(“hello”0, 0);

Last edited by orrinpants (May 1, 2020 14:28:21)

orrinpants
Scratcher
100+ posts

Workarounds to frequently suggested blocks

khan academy wrote:

stuff like:

4

orrinpants
Scratcher
100+ posts

Workarounds to frequently suggested blocks

orrinpants wrote:

khan academy wrote:

stuff like:

4


(SCRATCHBLOCKS: )
when green flag clicked
say [i underlined the underline] for (2) secs
orrinpants
Scratcher
100+ posts

Workarounds to frequently suggested blocks

umm
Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

Yeah, hopejay, the note says this also goes for other keys, in my tests projects this is also shown off.

Last edited by Beamy68 (May 1, 2020 14:44:07)

Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

orrinpants wrote:

i wish there was a AM/PM block
if <(current [AM/PM v]) = [PM]> then
say [its late] for (2) secs
end
There is a workaround for that

when green flag clicked
forever
if <<(current [hour v]) = [12]> or <(current [hour v]) > [12]>> then
set [AM/PM v] to [PM]
else
set [AM/PM v] to [AM]
end
end
orrinpants
Scratcher
100+ posts

Workarounds to frequently suggested blocks

|[ v]|

Last edited by orrinpants (May 1, 2020 15:37:56)

orrinpants
Scratcher
100+ posts

Workarounds to frequently suggested blocks

<[...] =/ [...]>
can be recreated with:
<not <[...] = [...]>>

Last edited by orrinpants (May 1, 2020 16:21:53)

Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

There is a workaround for
all at once {
...
} :: control
:D

The Workaround is wrote:

Make a custom block named all at once and remember to check the box titled “Run without screen refresh”

define all at once (script#)
if <(script#)=[1]> then
...
end
then run:
all at once [1]::custom

Last edited by Beamy68 (May 1, 2020 17:01:37)

-LekkerGames-
Scratcher
67 posts

Workarounds to frequently suggested blocks

Workaround for
<[message1 v] received?::events>




when I receive [message1 v]
set [message1 v] to [1]

when green flag clicked
set [message1 v] to [0]
forever
wait until <(message1) = [1]>
...
end

when green flag clicked
...
broadcast [message1 v]

Last edited by -LekkerGames- (May 1, 2020 17:14:41)

Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

-LekkerGames- wrote:

-snip-
Please check to see if your workaround has already been discussed here before posting.

Last edited by Beamy68 (May 1, 2020 18:20:07)

Hopeijay
Scratcher
90 posts

Workarounds to frequently suggested blocks

orrinpants wrote:

|[ v]|
If you mean absolute value…
set [|value| v] to ([abs v] of [value])
Tommy3x3
Scratcher
35 posts

Workarounds to frequently suggested blocks

Computer_Fizz wrote:

Events :: events hat
when ( :: obsolete) clicked :: events hat
...
can be recreated with the following code:
when @greenFlag clicked
forever
set [timer v] to ( timer )
end

when [timer v] > ( timer :: variables )
. . .
———————————————————–
when < . . . > is true :: events hat
can be recreated with the following code:
when @greenFlag clicked
broadcast [ Continue v]
when [timer v] > ( timer :: variables )
broadcast [ Continue v]
when I receive [Continue v]
broadcast [ Check v]
forever
set [ timer v] to ( timer )
when I receive [ Check v]
forever
if < . . . > then
. . .
end
end



Thank. You. So. Much.
ExplodingEggz
Scratcher
1 post

Workarounds to frequently suggested blocks

<key [ /] pressed?>
can be recreated with these two blocks
<key (letter (1) of [/]) pressed?> 

also works with period, comma and possibly the other keys.

It also seems like
<key (join [/] []) pressed?>
works too now.

Last edited by ExplodingEggz (May 2, 2020 02:15:20)

GuineaGod
Scratcher
500+ posts

Workarounds to frequently suggested blocks

ExplodingEggz wrote:

<key [ /] pressed?>
can be recreated with these two blocks
<key (letter (1) of [/]) pressed?> 

also works with period, comma and possibly the other keys.

It also seems like
<key (join [/] []) pressed?>
works too now.

That is a good idea!
PixelYoshi
Scratcher
100+ posts

Workarounds to frequently suggested blocks

Beamy68 wrote:

-snip-
technically this just runs your code as fast as possible, not all at the same time. this workaround would run all your code at the same time, although it is annoying:
when i receive [run all at once v]
if <(script)=(1)> then
move (10) steps
end
when i receive [run all at once v]
if <(script)=(1)> then
change size by (10)
end
this would run the
move (10) steps
and the
change size by (10)
at the same time. if you wanted to do more than one script, add more
if <(script)=(...)> then
end
after the “when i receive” block.
to run the code, just put
set [script v] to (...)
broadcast [run all at once v]
this would run whatever script you chose with all the blocks at the same time.
SuperRyn
Scratcher
100+ posts

Workarounds to frequently suggested blocks

If you want to play a sound with a variable, use
play sound (Sound)
Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

PixelYoshi wrote:

Beamy68 wrote:

-snip-
-snip-
Well actually for some reason, when using the custom blocks without screen refresh, it ignores waiting, and other things, but Yeah, I forgot about that way, and I've used it in my projects once or twice

Last edited by Beamy68 (May 4, 2020 13:34:26)

Beamy68
Scratcher
100+ posts

Workarounds to frequently suggested blocks

ExplodingEggz wrote:

(-snip-)
please read if the workaround is already on the list lol
Hopeijay
Scratcher
90 posts

Workarounds to frequently suggested blocks

ExplodingEggz wrote:

<key [ /] pressed?>
can be recreated with these two blocks
<key (letter (1) of [/]) pressed?> 

also works with period, comma and possibly the other keys.

It also seems like
<key (join [/] []) pressed?>
works too now.

<key (join [?] []) pressed?>
also works as
<key ([shift] + [/]) pressed?>
Just something interesting.

Last edited by Hopeijay (May 4, 2020 15:47:38)

Powered by DjangoBB