Discuss Scratch

Zekrom01
Scratcher
1000+ posts

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

Some people have to do this:
if <> then
...
else ::celse
if <> then
...
else ::celse
if <> then
...
else ::celse
if <> then
...
else ::celse
if <> then
...
else ::celse
...
end
It gets really tiring easily because you have to drag too many blocks, I know. I've thought of a plan.

If you right click an
if <> then

end
statement, there would be a button saying
New If Then Statement
When clicked, it will add a new if then statement below it:
if <> then
...
else if <> then ::celse
... //another if then statement
end

You can do that as many times as you like.
if <> then
...
else if <> then ::celse
...
else if <> then ::celse
...
else if <> then ::celse //and so on!
...
end
If you right-click the if <> then block after adding one below it, a new button appears: (woah!)
Else Statement
You can end an if <> then statement with that.
if <> then
...
else if <> then ::celse
...
else if <> then ::celse
...
else if <> then ::celse
...
else ::celse
...
end
Example of usage:
if <(points) > [50 ]> then
say [Woah! Good job!]
else if <(points) > [100 ]> then ::celse
say [Amazing! You're getting good!]
else if <(points) > [500 ]> then ::celse
say [WHAT?!?!?! YOUR A PRO!!!!!]
else if <(points) > [1000 ]> then ::celse
say [OMG WHAT!!!!!!!!!!]
else ::celse
say []
end
(Switch the positions of all the Booleans on the above block, 1000 is top, 50 last. Thx woohooboy)
NOTE: I am not trying to replace:
if <> then

else ::celse
I am trying to make things convenient.

Conclusion: This block is basically the switch statement and else if/elif blocks in scratch.


Thanks for reading.
~Zekrom01

Support

Zekrom01
Apfellord
Scratcher1002
charlesdog
Cream_E_Cookie
stickfiregames
CosmicHamster
Leadrien2366
ChocolatePi
IronBit_Studios
Chibi-Matoran
MrSwaggerMuffin
wizard192
Zappy1333
Arthurtilly
DrKat123
Gustavo6046
little_kitten
DatOneLefty
pusheenkittens
BoyKetchup (assuming support)
Charmind
scratchisthebest (assuming support)
Tessaract2
SkyShine
pvz_pro
MathlyCat
Studio04040807 (if the block always has else on the end)
BlockWare (if the block always has else on the end)
pianogirl84
alexphan


Semi-Support

DaSpudLord
The_Kitty_Eevee (assuming)
massazza

No Support
Alberknyis

Last edited by Zekrom01 (March 12, 2016 14:53:34)


20 something years old
Probably doing college work
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
DaSpudLord
Scratcher
1000+ posts

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

Semi-support, this could be confusing to inexperienced scratchers.


U^ェ^U::motion//This is Blocky. He lives in my signature. He is a trained attack block. He protects my siggy from kumquats.
Apfellord
Scratcher
100+ posts

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

Love this idea!
Scratcher1002
Scratcher
1000+ posts

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

This is an almost exact replica of the switch statement in Javascript, (C, C++, C#?) and other languages, I would prefer that doe. Support.
CatsUnited
Scratcher
1000+ posts

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

DaSpudLord wrote:

Semi-support, this could be confusing to inexperienced scratchers.
It says you have support though.

Scratcher1002 wrote:

This is an almost exact replica of the switch statement in Javascript, (C, C++, C#?) and other languages, I would prefer that doe. Support.
If the switch statement was added, it would pretty much look like that.

bottom text
charlesdog
Scratcher
1000+ posts

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

This would be so helpful! Support!

i really dont know what to put here
Scratcher1002
Scratcher
1000+ posts

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

CatsUnited wrote:

DaSpudLord wrote:

Semi-support, this could be confusing to inexperienced scratchers.
It says you have support though.

Scratcher1002 wrote:

This is an almost exact replica of the switch statement in Javascript, (C, C++, C#?) and other languages, I would prefer that doe. Support.
If the switch statement was added, it would pretty much look like that.
Only the switch statement only handles one variable, not ten.
Cream_E_Cookie
Scratcher
1000+ posts

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

Support

















CatsUnited
Scratcher
1000+ posts

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

Scratcher1002 wrote:

Only the switch statement only handles one variable, not ten.
I didn't say exactly like that, I meant by something similar to
switch (var) then :: control cstart 
// or something more child-friendly
if < = [1] :: operators> then
...
else
...
end

end

bottom text
stickfiregames
Scratcher
1000+ posts

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

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.










If you can read this, my signature cubeupload has been eaten by an evil kumquat!




or you just used Inspect Element, you hacker

;
CosmicHamster
Scratcher
100+ posts

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

Support!

I'm just a little cosmic hamster from Planet NO, which is in another dimension. Are you, too?
(I'm also a forum lurker…)
#PrayForParis
Check out my games, if you want to. I make sure to share a cool variety, but even though I haven't shared much, I try to make each one count, but they can only count to 7 so far.


Coins ~ Ninety Degrees ~ Spiked Walls ~ Colourz ~ Bubble Popper ~ Candy Thief ~ Gameplace
Leadrien2366
Scratcher
100+ posts

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

DaSpudLord wrote:

Semi-support, this could be confusing to inexperienced scratchers.
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
Scratcher1002
Scratcher
1000+ 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.
^^ Or the switch statement with one variable because I hate having to do:
if <(pick random (1) to (10)) = (variable)> then

else
if <(pick random (1) to (10)) = (variable)> then

else
if <(pick random (1) to (10)) = (variable)> then

else
if <(pick random (1) to (10)) = (variable)> then

else
if <(pick random (1) to (10)) = (variable)> then

else
if <(pick random (1) to (10)) = (variable)> then

else
if <(pick random (1) to (10)) = (variable)> then

else
if <(pick random (1) to (10)) = (variable)> then

else
if <(pick random (1) to (10)) = (variable)> then

else
if <(pick random (1) to (10)) = (variable)> then

end
end
end
end
end
end
end
end
end
end
Leadrien2366
Scratcher
100+ posts

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

Changing my strange to support.
Zekrom01
Scratcher
1000+ posts

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

Leadrien2366 wrote:

Changing my strange to support.
Your strange to support? O.O
just kidding

20 something years old
Probably doing college work
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
ChocolatePi
Scratcher
1000+ posts

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

DaSpudLord wrote:

Semi-support, this could be confusing to inexperienced scratchers.
How would it be confusing?

I support! It's much better than calling it “elif”. I'm not sure about the wording on the item in the right-click menu though. How about “insert condition” or something?
DaSpudLord
Scratcher
1000+ posts

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

ChocolatePi wrote:

DaSpudLord wrote:

Semi-support, this could be confusing to inexperienced scratchers.
How would it be confusing?

I support! It's much better than calling it “elif”. I'm not sure about the wording on the item in the right-click menu though. How about “insert condition” or something?

User1 wrote:

Why r der soooooo mannneeee c thingies on da block??????!!!!!!!!!???????:
if <> then::control cstart

else if <> then::celse

else if <> then::celse

else if <> then::celse

else if <> then::celse

else if <> then::celse

else if <> then::celse

else if <> then::celse

else::celse

end

Last edited by DaSpudLord (Nov. 15, 2015 23:54:05)



U^ェ^U::motion//This is Blocky. He lives in my signature. He is a trained attack block. He protects my siggy from kumquats.

Powered by DjangoBB