Discuss Scratch

Botcho_Otkho
Scratcher
1000+ posts

Workarounds to frequently suggested blocks

PixelYoshi wrote:

the topic name is "Workarounds to frequently suggested blocks."
I don't think that the title is enough for the topic author to delete any uncommon workaround.

I see now that the circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are. - Mewtwo
- Be moist







Stop reading this
Hopeijay
Scratcher
80 posts

Workarounds to frequently suggested blocks

PixelYoshi wrote:

R4356th wrote:

Botcho_Otkho wrote:

Nambaseking01 wrote:

Please don't find workarounds for blocks that don't get suggested often. Chances are they'll never be used.
I don't really see that as a problem: if an user needs a workaround, they might find it in this list and then use it.
Agreed.
the topic name is "Workarounds to frequently suggested blocks.

You are right about the title but I am pretty sure that almost everyone just comes to this thread for a workaround that they may need but it may not be very “frequently suggested.” If the community decides that the tread is for something different than the title and almost everyone is okay with it, then it's probably fine. Just try not to worry about the little things and use this thread for what it is. I can understand your concern but you would probably be better off not worrying about it. Thank you
stop [this post v]


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
80 posts

Workarounds to frequently suggested blocks

Computer_Fizz wrote:

noogai34 wrote:

Computer_Fizz wrote:


———————————————————–
< key [enter v] pressed? >
can be recreated with the following code:
< key ( join [enter] [] ) pressed? >
// this also goes for other keys not on the drop-down as well
Tab doesn't work. I'm trying to make an Impossible quiz (and one of the main features is that you can't press Tab), So i put:
<key ( join [tab] [] ) pressed?>
but pressing tab did nothing!
Yes, unfortunately it appears that tab does not work, along with other keys such as shift, control, etc. It seems that enter is the only non-single-letter key that works, and I'll update the original post accordingly. But yes, unfortunately I don't believe there's any known way to detect a tab press at this time.

You may be able to sort of recreate
<key (join [shift] []) pressed?>
with
<key (join [@] []) pressed?>
This will make it so the user will have to press shift while pressing the 2 key.
I believe that works (with other shift+number keys as well) and it is the closest thing to key shift pressed I can think of.

Last edited by Hopeijay (April 28, 2020 05:54:10)



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!
orrinpants
Scratcher
86 posts

Workarounds to frequently suggested blocks

i wish there was a AM/PM block


if <(current [AM/PM v]) = [PM]> then
say [its late] for (2) secs
end
orrinpants
Scratcher
86 posts

Workarounds to frequently suggested blocks

this already exists but heres funny way:
stop [this post v]

orrinpants's blocks wrote:

<key (join[] [                                                                          ]) pressed?>
start [this post v] again
(it means key space pressed)

Last edited by orrinpants (May 1, 2020 14:18:54)

orrinpants
Scratcher
86 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
86 posts

Workarounds to frequently suggested blocks

khan academy wrote:

stuff like:

4

orrinpants
Scratcher
86 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
86 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)


when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

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

when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

orrinpants
Scratcher
86 posts

Workarounds to frequently suggested blocks

|[ v]|

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

orrinpants
Scratcher
86 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)


when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

-LekkerGames-
Scratcher
20 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)


when green flag clicked
forever
imagine lekker games::motion
program lekker games::sound
share lekker games::operators
end
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)


when <true ::operators> ::control hat
say [Snap! is cool but I also like scratch.]

You can make custom quote text:

Pretty neat, huh?

Hopeijay
Scratcher
80 posts

Workarounds to frequently suggested blocks

orrinpants wrote:

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


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!
Tommy3x3
Scratcher
23 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.

when green flag clicked
say [ello]
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!

GuineaGod
Advanced coder ll Helper ll Platformer Expert ll
Bug Expert ll My stats ll Profile ll My Projects ll


Powered by DjangoBB

Standard | Mobile