Discuss Scratch

FinallyFoundUsername
Scratcher
65 posts

Helpful Workarounds for Frequently Suggested Blocks!

FIRE_FALL wrote:

FinallyFoundUsername wrote:

Also… Could you add another block where it inverts the colors? Like black to white, and white to black, etc.? I've tried to do this with the blocks we already have, but the end result requires to create separate costumes, which doesn't exactly work out because when the next page is clicked, it just goes to the same page with inverted colors which wouldn't be what I want. Thank you for reading my suggestions!


see @qucchia 's tutorial on how to make any sprite black and white
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/305961821/


oh you meant inverted colors, i guess that would be interesting but make a suggestion topic, not here

yeah i did. idk if anyones read it though
joeyp2011
Scratcher
45 posts

Helpful Workarounds for Frequently Suggested Blocks!

i know im not @shradibop (the creator of this topic) but i came up with a workaround for this:
<if <> then <> else <>>

this can be done with this
define get status of if <True?> then (IfThenValueHere) else (IfNotTrueValueHere)
if <<True?> = [True]> then
set [IfThenElseValue] to (IfThenValueHere)


else
set [IfThenElseValue] to (IfNotTrueValueHere)
end

or atleast i think

it can also be used like this:
if <[IfThenElseValue] = [True]> then
Do something
end

Last edited by joeyp2011 (Feb. 11, 2022 21:28:43)

memario1763
Scratcher
6 posts

Helpful Workarounds for Frequently Suggested Blocks!

k0d3rrr wrote:

Jerememes wrote:

I would like to have a work around for a block a bunch of people wanted to suggest
<sprite [Sprite1] is touching [Sprite2] ?>
The workaround is this: (Both scripts are placed in Sprite1)
when green flag clicked
forever
if <touching [Sprite2 v]> then
set [touching v] to [true]


else
if <not <touching [Sprite2 v]>> then
set [touching v] to [false]
end
end
Now for detection…
when green flag clicked
forever
wait until <<(touching) = [true]> or <(touching) = [false]>>
if <(touching) = [true]> then
say [True]
else
if <(touching) = [false]> then
say [False]
end
end
Don't Over Think It!?!?
when green flag clicked
if <touching [Sprite Name Here v] ?> then
say [True]
end
if <not <touching [Sprite Name Here v] ?>> then
say [False]
end
k0d3rrr
Scratcher
1000+ posts

Helpful Workarounds for Frequently Suggested Blocks!

memario1763 wrote:

k0d3rrr wrote:

Jerememes wrote:

I would like to have a work around for a block a bunch of people wanted to suggest
<sprite [Sprite1] is touching [Sprite2] ?>
The workaround is this: (Both scripts are placed in Sprite1)
when green flag clicked
forever
if <touching [Sprite2 v]> then
set [touching v] to [true]


else
if <not <touching [Sprite2 v]>> then
set [touching v] to [false]
end
end
Now for detection…
when green flag clicked
forever
wait until <<(touching) = [true]> or <(touching) = [false]>>
if <(touching) = [true]> then
say [True]
else
if <(touching) = [false]> then
say [False]
end
end
Don't Over Think It!?!?
when green flag clicked
if <touching [Sprite Name Here v] ?> then
say [True]
end
if <not <touching [Sprite Name Here v] ?>> then
say [False]
end
Or maybe this?
when green flag clicked
forever
if <touching [Sprite2 v]> then
set [touching v] to [true]
say [True]

else
if <not <touching [Sprite2 v]>> then
set [touching v] to [false]
say [False]
end
end
Aarnay3t
Scratcher
100+ posts

Helpful Workarounds for Frequently Suggested Blocks!

PrincessOwlette wrote:

Sorry if I have missed this and it has already been asked: Is there a workaround for
when [variable name] clicked :: list hat
Edit: fixed scratchblocks
I dunno, but if I find out, I will let you know
dante_ksk
Scratcher
100 posts

Helpful Workarounds for Frequently Suggested Blocks!

<[ message1 v] broadcasted?::events> 
when green flag clicked
broadcast [message1 v]
set [broadcasted v] to <([1] + [1]) = [2] >


when I receive [ message1 v]
...
broadcast [finished v]

when I recieve [ finished v] :: events hat
set [broadcasted v] to <(1) = [Infinity]>
BlahBlahHP
Scratcher
4 posts

Helpful Workarounds for Frequently Suggested Blocks!

hello
hai4a5
Scratcher
49 posts

Helpful Workarounds for Frequently Suggested Blocks!

shradibop wrote:

Hello! My name is @shradibop, and I'm the new host of this topic.

In the suggestions forum, you might have a suggestion for a block. But, if it gets rejected, have no fear! On this topic, you can easily ask for workarounds for block. Still don't get it? Confused as to why you can't just get the block added? @Za-Chary is here to explain that to you.

Za-Chary wrote:

Well, there's a couple reasons this is a useful list.

The “previous costume” block is not rejected, but it just hasn't been added to the editor. For those looking for something that works the same as a “previous costume” block, they can look at this topic for a workaround so they can effectively code their project.

The “when stop sign clicked” block is rejected, so we will not be adding it (and in this case, yes, there is something “wrong” with implementing the suggestion). Some Scratchers still might like to simulate its effects, however, so they can look at this topic for a workaround so they can accomplish what the block would do.

The purpose of this topic isn't to tell you to “stick” to workarounds — it's to provide you workarounds for blocks that you might be looking to use. It will likely save you time by using the workaround instead of waiting for us to implement a block.

It's a useful topic that can also get you more experienced with coding! Don't be afraid to ask/answer questions, the Scratch community is here to help!

Find the old ones here:
Computer_Fizz Forum
BearSlothCoding Forum

Below are some things you can use without having to ask for a workaround \/ \/ \/ \/

I have some pretty useful ones here https://scratch-mit-edu.ezproxyberklee.flo.org/projects/621656775/
MistyHH
Scratcher
100+ posts

Helpful Workarounds for Frequently Suggested Blocks!

BOBSchlowinskii wrote:

You should add a
i receive
block
like:
repeat until <i receive [example]>

end
<i receive [example v] :: events>
It's on the Official List of Rejected Suggestions I think.

dah_creepah wrote:

wow so cool can you tell me how to make this block

<Sprite being clicked?>
<<mouse down?> and <touching (mouse-pointer v) >>

FinallyFoundUsername wrote:

I don't exactly know which forum to suggest things… But I'd like to suggest adding on to the looks block: change/set __ by __. How this block has change ghost effect, color effect, mosaic effect, etc. Could an option be added to the blocks for blurring as well? It would be incredibly helpful (because usually I would have to go to a picture editor and animate the blur), thank you!
Suggest things here (if you want to take the risk of people saying “dupe” or “duplicate” and then your topic getting closed. Suggesting things aren't easy. Which the blur effect has already been suggested, I'm pretty sure. )
Also, to type blocks, click on the block symbol on the top of the message box.
Then choose the block you want, or type out your own, and you can color them by typing :: and then the block color you want.
for example :: looks // for example :: looks
Just for basic coloring, it needs to be a block category

FinallyFoundUsername wrote:

Also… Could you add another block where it inverts the colors? Like black to white, and white to black, etc.? I've tried to do this with the blocks we already have, but the end result requires to create separate costumes, which doesn't exactly work out because when the next page is clicked, it just goes to the same page with inverted colors which wouldn't be what I want. Thank you for reading my suggestions!
I don't know about brightness, but you can invert the hue with this block I think:
change [color v] effect by (100)

FinallyFoundUsername wrote:

-snip-
Yes.. I think that would be an excellent idea! Because it makes thumbnails a lot easier, especially for those where if you click stop, the thumbnail bounces down or whatever
You can make it already using this since all graphic effects are cleared when the project is stopped:
when green flag clicked
set [ghost v] effect to (100)
or if you want to animate it, you can use what Mahak2706 said:
when green flag clicked
... // If you want to make it disappear, here'd be where you'd do it (you need to make it disappear anyway but you can animate it here)
when gf clicked
forever
reset timer
end
when [timer v] > (0.01)
... // (Animation script goes here)
This works because when the flag is clicked, it's constantly resetting the timer, so the timer is always 0. But usually it's always counting up.
So when the project is stopped, it stops resetting the timer and the timer counts up again, then becomes greater than 0.01, which triggers that hat block to run, and therefore runs that script!

Edit: P.S., you can also edit your posts by clicking “Edit” on the bottom of them

Last edited by MistyHH (Feb. 27, 2022 01:01:04)

BionicBoy554
Scratcher
1000+ posts

Helpful Workarounds for Frequently Suggested Blocks!

You're going to my backpack.

Last edited by BionicBoy554 (Feb. 28, 2022 00:00:34)

BionicBoy554
Scratcher
1000+ posts

Helpful Workarounds for Frequently Suggested Blocks!

k0d3rrr wrote:

Or maybe this?
when green flag clicked
forever
if <touching [Sprite2 v]> then
set [touching v] to [true]
say [True]

else
if <not <touching [Sprite2 v]>> then
set [touching v] to [false]
say [False]
end
end

Won't you need a code like this if it's not just an example and you're actually using it?
if <[touching] = [true]> then

end

Last edited by BionicBoy554 (Feb. 28, 2022 00:13:02)

1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

Can you make cloud list?
Aadish_1759
Scratcher
1000+ posts

Helpful Workarounds for Frequently Suggested Blocks!

1080GBA wrote:

(#1034)
Can you make cloud list?
I can
1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

SeuAmigo35 wrote:

BearSlothCoding wrote:

SeuAmigo35 wrote:

BearSlothCoding wrote:

SeuAmigo35 wrote:

BearSlothCoding wrote:

I'd suggest getting the link to each post and putting it in the OP like I did for easier navigation, otherwise it kind of defeats the purpose of having them in separate posts. Great job otherwise though, I think this one will turn out a lot better than mine did.

SeuAmigo35 wrote:

(gonna repost this when the forum reaches 10 pages)
Why?
remember the problems i said about the “when stop sing clicked” block? you've only putted the solvement of 1 of them, an i only want to tell in this one when it gets popular.
But why not now? If you wait for 8 pages to pass, it will get popular and people will use the wrong workaround. Or you could do it now, and this topic won't have any problems.
Or I could just post the link to when you posted it and this could all be over.
there is a LOT of problems, i will make the same thing as before: each time this comment get quoted, i tell one of the problems.
Which is a waste of time. The problem with your system is that you post one problem, then you wait for me (before it was me, now it will be shradibop) to respond to it. Once I respond, then I will have to wait for you to respond again with the other problem and then this repeats for however many problems there are. This is the reason I didn't keep going with it, I left the stop sign script wrong because it was such an irritating hassle that I wasn't in the mood for and never was. I don't expect shradibop to act any differently because very few people have the patience to keep responding, waiting for their “LOTS of problems” to get called out. All the while the person calling them out keeps acting somewhat rude by putting unnecessary phrases in bold that makes a lot of the post seem aggressive. And keep putting things in caps which shows that what they are talking about is important and needs to be emphasized, yet they take their time to tell you exactly what they are talking about. Most of this could not happen if you could just post them all in one post (or maybe two or three so you don't have a post that you need to spend a minute scrolling through) and there is no waiting at all.
ok ok… i will do this time 2 problems in each comment. let's get started.
Problem 1: no continues (already solved)
did you know the script of the stop sing that everyone uses only happens once? the timer stops being reseted and if the person press stop sing 2 times, it won't acts. here the safe way:
when green flag clicked
forever
reset timer
end
when [timer v] > (0)
forever
reset timer
end
when [timer v] > (0)
...::cap
Problem 2: script stoping
Have you ever used the stop sing block in a project that has the
stop [all v]
block? well, if you do this, the script of the stop sing will stop and act.
that should be one of the worst problems. it's like a workaround to
when project stopped::events hat
block. to solve it, make a spirite and put only that:
when green flag clicked
forever
reset timer
end
when [timer v] > (0)
forever
reset timer
end
when [timer v] > (0)
broadcast [stop sing v]
then put that to replace the
stop [all v]
block (in other spirite):
...::hat
stop [other scripts from the spirite v]::control//i can't fix it help me
broadcast [stop v]
stop [this script v]
for the other spirites exept the stop sing spirite:
when I receive [stop v]
stop [other scripts from the spirite v]
for the spirites you want to do something when stop sing is clicked:
when I receive [stop sing v]
...::cap

Like this:

st◌p [ other scripts from this sprite v]::control

Maybe can't display on phone

Last edited by 1080GBA (March 2, 2022 02:14:32)

1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

message deleted

Last edited by 1080GBA (March 2, 2022 02:15:13)

1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

SeuAmigo35 wrote:

SeuAmigo35 wrote:

SeuAmigo35 wrote:

BearSlothCoding wrote:

SeuAmigo35 wrote:

BearSlothCoding wrote:

SeuAmigo35 wrote:

BearSlothCoding wrote:

I'd suggest getting the link to each post and putting it in the OP like I did for easier navigation, otherwise it kind of defeats the purpose of having them in separate posts. Great job otherwise though, I think this one will turn out a lot better than mine did.

SeuAmigo35 wrote:

(gonna repost this when the forum reaches 10 pages)
Why?
remember the problems i said about the “when stop sing clicked” block? you've only putted the solvement of 1 of them, an i only want to tell in this one when it gets popular.
But why not now? If you wait for 8 pages to pass, it will get popular and people will use the wrong workaround. Or you could do it now, and this topic won't have any problems.
Or I could just post the link to when you posted it and this could all be over.
there is a LOT of problems, i will make the same thing as before: each time this comment get quoted, i tell one of the problems.
Which is a waste of time. The problem with your system is that you post one problem, then you wait for me (before it was me, now it will be shradibop) to respond to it. Once I respond, then I will have to wait for you to respond again with the other problem and then this repeats for however many problems there are. This is the reason I didn't keep going with it, I left the stop sign script wrong because it was such an irritating hassle that I wasn't in the mood for and never was. I don't expect shradibop to act any differently because very few people have the patience to keep responding, waiting for their “LOTS of problems” to get called out. All the while the person calling them out keeps acting somewhat rude by putting unnecessary phrases in bold that makes a lot of the post seem aggressive. And keep putting things in caps which shows that what they are talking about is important and needs to be emphasized, yet they take their time to tell you exactly what they are talking about. Most of this could not happen if you could just post them all in one post (or maybe two or three so you don't have a post that you need to spend a minute scrolling through) and there is no waiting at all.
ok ok… i will do this time 2 problems in each comment. let's get started.
Problem 1: no continues (already solved)
did you know the script of the stop sing that everyone uses only happens once? the timer stops being reseted and if the person press stop sing 2 times, it won't acts. here the safe way:
when green flag clicked
forever
reset timer
end
when [timer v] > (0)
forever
reset timer
end
when [timer v] > (0)
...::cap
Problem 2: script stoping
Have you ever used the stop sing block in a project that has the
stop [all v]
block? well, if you do this, the script of the stop sing will stop and act.
that should be one of the worst problems. it's like a workaround to
when project stopped::events hat
block. to solve it, make a spirite and put only that:
when green flag clicked
forever
reset timer
end
when [timer v] > (0)
forever
reset timer
end
when [timer v] > (0)
broadcast [stop sing v]
then put that to replace the
stop [all v]
block (in other spirite):
...::hat
stop [other scripts from the spirite v]::control//i can't fix it help me
broadcast [stop v]
stop [this script v]
for the other spirites exept the stop sing spirite:
when I receive [stop v]
stop [other scripts from the spirite v]
for the spirites you want to do something when stop sing is clicked:
when I receive [stop sing v]
...::cap
no one is gonna quote this???
oh my god. nevermind. here goes the next one.
Problem 3: other blocks
there are lots of “workarounds to frequently suggested blocks” that uses the timer. however, if we use the
repeat for () secs{}@loopArrow :: control
workaround and the
when (::) clicked ::hat events
at the same time, it will repeat FOREVER.
that's where the second method stands for. however, it don't solve the previous problems, so we do it like this:
when green flag clicked
forever
set [timer v] to (timer)
end
when [timer v] > (timer)
forever
reset timer
end
when [timer v] > (timer)
broadcast [stop sing v]
the workaround that people do for “repeat for () scs” is this one:
...::hat
reset timer
repeat until <(timer) = (wanted seconds)>
...
end
...::cap
however, it don't work (did you seen what happen when it happens 2 times?) i'm trying to find a better workaround.


...::hat
set [ timer var v] to [0]
forever
wait (0.01) secs
change [ timer var v] by (0.01)
end

...::hat
repeat until <( timer var ) = (wanted seconds)>
do something
end
...

Last edited by 1080GBA (March 2, 2022 02:16:50)

1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

lionheart921 wrote:

shradibop wrote:

Control
_______________________________________________________________________________________________

 while < . . . > { . . . } @loopArrow :: control 
can be done by doing this:
 repeat until < not < . . . > >
...
_______________________________________________________________________________________________

if <...> then {
...
} else if <...> {
...
} :: control

Can be done with:

if <...> then 
...
else
if <...> then
...
end
end
Don´t forget
if <> then {

} else if <> {

} else {

}::control
solution:
if <> then 



else
if <> then



else

end
end
1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

DoggyJET wrote:

SparkScratch_P wrote:

Here is a workout for this block:


stop saying [ hello]

Use of this block:

forever
if <touching [mouse pointer v] ?> then
say [hello]


else
stop saying [ hello]
end
end


Workout:


forever
if <touching [mouse pointer v] ?> then
say [hello] for (0.01) secs

end
end


An alternate way is:

when green flag clicked
forever
if <touching [ mouse-pointer] ?> then
say [hello]



else
think []
end
end

lol
the easiest way is:
when green flag clicked
forever
if <touching [ mouse-pointer v] ?> then
say [Hello!]


else
say ()
end
end

Last edited by 1080GBA (March 2, 2022 02:17:47)

1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

In case someone asked for this block:
(total number of costumes in this sprite)
Workaround:
define whatever name you want
switch costume to [(costume #2)]
set [total number of costumes in this sprite v] to [1]
repeat until <(costume #) = [1]>
change [total number of costumes in this sprite v] by (1)
next costume
end
REMEMBER RUN WITHOUT SCREEN REFRESH
similar code for backdrop
1080GBA
Scratcher
500+ posts

Helpful Workarounds for Frequently Suggested Blocks!

Aarnay3t wrote:

This is not a workaround but have you ever been through the awful time where you have to copy scripts to every single sprite?
Here is a tip:
Go to the hat block at the top of the script and right-click it
 when green flag clicked
After that press Ctrl+C to copy the script
Then, go to the sprite you need and press Ctrl+V to paste the script
Oh yeah

Last edited by 1080GBA (Feb. 28, 2022 11:06:05)

Powered by DjangoBB