Discuss Scratch

Zekrom01
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

bump

20 something years old
Probably doing college work
IronBit_Studios
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

Possible duplicate, but support.

gdpr533f604550b2f20900645890
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

In other programming languages, you can do this:
if (boolean1) //These if-else statements are lined up
{

}
else if (boolean2)
{

}
else if (boolean3)
{

}
See how readable this code is, as opposed to this?
if <boolean1> then //Such indentation much wow

else
if <boolean2>

else
if <boolean3>
end
end
Support.
MrSwaggerMuffin
Scratcher
83 posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

I support this, it would certainly help.

dank memes
dank memes
wizard192
Scratcher
100+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

Support, some platformers have to do that and the script gets bigger than necessary
WooHooBoy
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

Zekrom01 wrote:

if <(points) > [50 ]> then
say [Woah! Good job!]
if <(points) > [100 ]> then ::celse
say [Amazing! You're getting good!]
if <(points) > [500 ]> then ::celse
say [WHAT?!?!?! YOUR A PRO!!!!!]
if <(points) > [1000 ]> then ::celse
say [OMG WHAT!!!!!!!!!!]
else ::celse
say []
end
Just noting that wouldn't work because the first statement will always be evaluated. If you have > 1000 first it would activate the correct one.

considered harmful
Zekrom01
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

Zekrom01 wrote:

bump

20 something years old
Probably doing college work
Zappy1333
Scratcher
100+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

stickfiregames wrote:

For the example you gave, it sounds as if it should be renamed to
if <... :: operators> then
...
else if <... :: operators> then :: control celse
...
else if <... :: operators> then :: control celse
...
else
...
end
Support for that.
^^^
Arthurtilly
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

Duplicate (I posted this exact idea and THAT was a duplicate) but support.

“The world is a weird place” - Sigton | “Scratch has swallowed my life” - Sigton
“I DREW I SPOODER” - ZLGames | “My current plan is to make a plan” - ZLGames
"It's hard to watch people hanging upside down from a tree. Especially when there are no trees. - NDSDNS
“That was not grammar of correctlyness” - Arthurtilly
Zekrom01
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

WooHooBoy wrote:

Zekrom01 wrote:

if <(points) > [50 ]> then
say [Woah! Good job!]
if <(points) > [100 ]> then ::celse
say [Amazing! You're getting good!]
if <(points) > [500 ]> then ::celse
say [WHAT?!?!?! YOUR A PRO!!!!!]
if <(points) > [1000 ]> then ::celse
say [OMG WHAT!!!!!!!!!!]
else ::celse
say []
end
Just noting that wouldn't work because the first statement will always be evaluated. If you have > 1000 first it would activate the correct one.
(Late) Thanks, I'll fix it.

Bump

20 something years old
Probably doing college work
DrKat123
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

Support, i'm sure this is pretty similar with the switch statement

Moving from Scratch? Don't learn C or Java, try Snap!
it haz OOP
DrKat McKatFace
First of all I'm 100% human and humans does not have a cat face
and second, the Boaty McBoatFace/Parsey McParseFace madness has just begun

λ
Sharp, my new Scratch mod
Is my post/siggy worthy for an internet?
Gustavo6046
Scratcher
100+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

Very good. The workaround exists but is tiring. FULL SUPPORT!

I come from Programmerland, former Brazil's South, to bring the best dreams and help to everybody!

Could be doing C++, C, Python or maybe Java… but surely Scratch!!
Check out my project titled Plate 2D: The Robber Disease…
tiger75
Scratcher
100+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

How would you do this on laptops? I use a macbook pro to Scratch, so… Maybe control click?

Two things are infinite: the universe and human stupidity. And I'm not sure about the universe. - Albert Einstein
Zekrom01
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

tiger75 wrote:

How would you do this on laptops? I use a macbook pro to Scratch, so… Maybe control click?
sure

20 something years old
Probably doing college work
little_kitten
Scratcher
500+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

Support

The above post was likely clear sass. 10 outta 10.
Unless it wasn't. Which happens from time to time. Sadly.
DatOneLefty
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

support. it is like
if () {
...
}
 if () {
...
}
if () {
...
}
if () {
...
}
if () {
...
}
if () {
...
}


Scratch data available at ScratchDB (Status)

Posts: bf97b44a7fbd33db070f6ade2b7dc549 (btw i use arch)
Alberknyis
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

I hope you're okay with adding someone to your no supporters list. In an unfinished project I had to use eight if-else blocks inside each other, and I didn't have a problem with that. I'm not saying this suggestion is confusing or anything, because it isn't. I just don't mind the way if-else blocks are right now.

stop [all v] ::stack
pusheenkittens
Scratcher
100+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

No support because I want to be the first non-supporter Support! This saves time. Just right click and click an option, you've got a new statement. Without this, people have to pull out a completely new block. ._.

hehe
Zekrom01
Scratcher
1000+ posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

Alberknyis wrote:

I hope you're okay with adding someone to your no supporters list. In an unfinished project I had to use eight if-else blocks inside each other, and I didn't have a problem with that. I'm not saying this suggestion is confusing or anything, because it isn't. I just don't mind the way if-else blocks are right now.
I understand why you don't support, and I sort of don't mind how if-else blocks work. However, this suggestion will make if-else statements more readable to others, and is also in other languages kind of like this, for example, the C++ formatting:
if (condition) 
{
statement
}
else if (condition)
{
statement
}
else if (condition)
{
statement
}
else
{
statement
}
Unlike the Scratchblocks system
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
if <> then ::cstart
else ::celse
...
It's just more convenient and easier to read and understand the scripts.

20 something years old
Probably doing college work
BoyKetchup
Scratcher
96 posts

Suggestion for the if <> then block (25+ support, 3 semi, 1 no)

I think this is a good idea, but you should be rendering the blocks like this:
if <> then

else if <> then::celse

else if <> then::celse

else

end
With “else” before every “if” after the first “if”. That's the format most other programming languages use and would help new Scratchers learn other programming languages easier.
Also, instead of a pop-up menu you could have + and - buttons to add “else” sections.
if <> then

else if <> then::celse

else (Remove "else"::control) (Add "else"::control)::celse

end
Except with they would look more like buttons, and the text in the buttons could be different.

Powered by DjangoBB