This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-03-27 15:02:34

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

If, if, else Block

I recently came up with the idea of replacing the "if, else" blocks.  Instead, there would be a different version in which you can [color-green]add or subtract the number of conditions[/color], plus the "else" section, in case none of the above were met.  If would replace nesting the "if, else" blocks multiple times.  Here's a mock-up:
http://mysite.verizon.net/bradley.phillyboy22/IfIfIfElse.gif
I made the original picture, and olivora added the plus/minus buttons that I forgot.

What do you think?

I wrote:

Notice: this is my 50th post!  smile

Last edited by Rexpup (2011-03-27 15:08:22)


http://i.imgur.com/QQH4J.gif

Offline

 

#2 2011-03-27 18:14:30

ian528
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: If, if, else Block

Use the <<  <and>  >> block.  smile

Offline

 

#3 2011-03-27 21:18:42

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: If, if, else Block

Actually, what would work is this:
<if>
<else>
<if>
<else>
<if>
<else>
<end>[/blocks]
Just put a whole bunch of the if/else blocks inside each other.

Offline

 

#4 2011-03-27 22:20:59

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: If, if, else Block

kayybee wrote:

Actually, what would work is this:
<if>
<else>
<if>
<else>
<if>
<else>
<end>[/blocks]
Just put a whole bunch of the if/else blocks inside each other.

Do you have any idea how confusing that gets when there's a lot of those? This would work a lot like the case switch in Java, which is really useful. I support.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#5 2011-03-27 23:09:58

scratch_yoshi
Scratcher
Registered: 2009-06-12
Posts: 1000+

Re: If, if, else Block

Use the {< > or < >} block.

Last edited by scratch_yoshi (2011-03-27 23:10:45)


Retired from Scratch, but just the language itself. Not the forums.

Offline

 

#6 2011-03-30 19:14:28

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

Harakou wrote:

kayybee wrote:

Actually, what would work is this:
<if>
<else>
<if>
<else>
<if>
<else>
<end>[/blocks]
Just put a whole bunch of the if/else blocks inside each other.

Do you have any idea how confusing that gets when there's a lot of those? This would work a lot like the case switch in Java, which is really useful. I support.

Yeah, I'm trying to replace nesting a ton of those.


http://i.imgur.com/QQH4J.gif

Offline

 

#7 2011-04-04 09:22:25

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

scratch_yoshi wrote:

Use the {< > or < >} block.

No, I want multiple settings, such as If Variable=1, Variable=2, ect.


http://i.imgur.com/QQH4J.gif

Offline

 

#8 2011-04-09 15:55:18

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

I'd like this in Scratch 2.0.  Would You?


http://i.imgur.com/QQH4J.gif

Offline

 

#9 2011-04-11 21:54:28

TVflea
Scratcher
Registered: 2010-08-14
Posts: 1000+

Re: If, if, else Block

support


-iNetMaster-'s not dead, get used to it. ! big_smile .
http://is.gd/YrQzXX

Offline

 

#10 2011-04-12 19:28:40

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

TVflea wrote:

support

Yay. You support!


http://i.imgur.com/QQH4J.gif

Offline

 

#11 2011-04-13 11:08:45

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Offline

 

#12 2011-04-13 19:58:05

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

rdococ wrote:

I don't like it, not useful... Unless you know your X and Y on Scratch, which I don't.

It is useful. I get really annoyed nesting these.

X is left/right, and Y is up/down.  X is -240 to 240, and Y is 180 to -180.  Besides, this has so many more uses than just  X/Y stuff.

Last edited by Rexpup (2011-04-13 20:01:53)


http://i.imgur.com/QQH4J.gif

Offline

 

#13 2011-04-13 20:16:29

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: If, if, else Block

rdococ wrote:

I don't like it, not useful... Unless you know your X and Y on Scratch, which I don't.

What does this have to do with x and y positions?


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#14 2011-04-13 20:40:05

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

Harakou wrote:

rdococ wrote:

I don't like it, not useful... Unless you know your X and Y on Scratch, which I don't.

What does this have to do with x and y positions?

I didn't exactly know what he was talking about either.


http://i.imgur.com/QQH4J.gif

Offline

 

#15 2011-04-13 21:35:14

TVflea
Scratcher
Registered: 2010-08-14
Posts: 1000+

Re: If, if, else Block

rdococ wrote:

I don't like it, not useful... Unless you know your X and Y on Scratch, which I don't.

almost everyone knows X and Y unless you are in 3rd grade


-iNetMaster-'s not dead, get used to it. ! big_smile .
http://is.gd/YrQzXX

Offline

 

#16 2011-04-14 07:33:29

TheSaint
Scratcher
Registered: 2008-11-04
Posts: 1000+

Re: If, if, else Block

While this is slightly useful, it won't be a priority because it can be done using the nesting feature. But I agree, it would be nice to have.  smile

Offline

 

#17 2011-04-17 13:16:37

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

TVflea wrote:

rdococ wrote:

I don't like it, not useful... Unless you know your X and Y on Scratch, which I don't.

almost everyone knows X and Y unless you are in 3rd grade

Although I think that Scratchers should learn about X and Y, I don't think you should call people 3rd graders.

TheSaint wrote:

While this is slightly useful, it won't be a priority because it can be done using the nesting feature. But I agree, it would be nice to have.

So, do you support?


http://i.imgur.com/QQH4J.gif

Offline

 

#18 2011-04-17 14:13:51

tvflame
Scratcher
Registered: 2010-10-15
Posts: 19

Re: If, if, else Block

Rexpup wrote:

TVflea wrote:

rdococ wrote:

I don't like it, not useful... Unless you know your X and Y on Scratch, which I don't.

almost everyone knows X and Y unless you are in 3rd grade

Although I think that Scratchers should learn about X and Y, I don't think you should call people 3rd graders.

TheSaint wrote:

While this is slightly useful, it won't be a priority because it can be done using the nesting feature. But I agree, it would be nice to have.

So, do you support?

i do!


http://images.cooltext.com/2054899.gif
" I'm a TV on fire!!!!!  tongue "

Offline

 

#19 2011-04-18 10:23:29

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: If, if, else Block

Wait -- give me a chance to change my mind! Actually, I swapped my thoughts on it: Uses I would use it for:
- My Syn(t)OS!
- Different actions on buttons, so they can be spoken on?

Offline

 

#20 2011-04-19 07:45:55

Rexpup
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: If, if, else Block

rdococ wrote:

Wait -- give me a chance to change my mind! Actually, I swapped my thoughts on it: Uses I would use it for:
- My Syn(t)OS!
- Different actions on buttons, so they can be spoken on?

Yeah, those would be good aplications for it.  You can change your mind on it.

tvflame wrote:

i do!

Yay.

ian528 wrote:

Use the << <and> >> block.

No, I want different things to happen for different functions.

Here's a link to the Scratch Suggestions page for this topic.


http://i.imgur.com/QQH4J.gif

Offline

 

#21 2011-04-19 08:18:35

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: If, if, else Block

I kinda support.

But not as priority


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#22 2011-04-19 08:58:14

GarSkutherGirl
Scratcher
Registered: 2009-04-27
Posts: 1000+

Re: If, if, else Block

SUPPORT. This would be useful in those 1-sprite-1-script games. 
OT: I'm going to the mall today. :3


Oh, the glory of it all - adorable cat people dressed as video game characters!
http://fc05.deviantart.net/fs71/f/2011/311/8/b/look_in_the_description_for_the_actual_epicness__by_garskuthergirl-d4fggrw.pnghttp://fc02.deviantart.net/fs70/f/2011/311/d/c/ahahahaha______by_garskuthergirl-d4fgc04.png

Offline

 

#23 2011-04-19 14:38:09

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: If, if, else Block

I like it.
Why do you write in colors like that?

Offline

 

#24 2011-04-20 14:34:47

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: If, if, else Block

I was going to code this block!  big_smile

Offline

 

#25 2011-04-21 15:52:48

williambl
Scratcher
Registered: 2011-04-08
Posts: 100+

Re: If, if, else Block

Great! Even though I LIKE nesting [blocks] <if> <else> <end> <if> <else> <end> <if> <else> <end> [/blocks]


http://internetometer.com/imagesmall/34650.png
http://www.danasoft.com/sig/Epicnesssign.jpg

Offline

 

Board footer