Discuss Scratch

Scratch12300
Scratcher
500+ posts

New "if <> then" block.

is what it would look like. Now here's an example of what it does:
if <(flash?) = [1]> and stop script if not
show
repeat (flash #)
change [color v] effect by (10)
end
end
hide

That would mean that if the variable flash?'s value was 1, it would change the color effect by 10, and repeat this as many times as the value of the variable flash #. But with one exception: As soon as the variable flash?'s value was not 1, it would immediately stop changing the color effect by 1, and hide.

Any workarounds?

Last edited by Scratch12300 (Aug. 3, 2013 14:02:31)

ProdigyZeta7
Scratcher
1000+ posts

New "if <> then" block.

*megafacepalm* It's too easy to make.
if <boolean> then
...
else
stop [this script v]
DotDash
Scratcher
1000+ posts

New "if <> then" block.

ProdigyZeta7 wrote:

*megafacepalm*
Lol
Chainmanner
Scratcher
100+ posts

New "if <> then" block.

That's not really needed. After all, instead of programming a new block that says
if <var = true>
do something
else say “m00ph454”

you can just have it like this:
if <var = true>
do something
else
stop

I mean, come on now, it's just one block. It's not even commonly used.
Scratch12300
Scratcher
500+ posts

New "if <> then" block.

ProdigyZeta7 wrote:

*megafacepalm* It's too easy to make.
if <boolean> then
...
else
stop [this script v]

Chainmanner wrote:

That's not really needed. After all, instead of programming a new block that says
if <var = true>
do something
else say “m00ph454”

you can just have it like this:
if <var = true>
do something
else
stop

I mean, come on now, it's just one block. It's not even commonly used.
No no no no no no and no. I meant stop the script inside the if <> then block! If you thought I meant stop the whole script, then I agree, *megafacepalm*.
turkey3
Scratcher
1000+ posts

New "if <> then" block.

Scratch12300 wrote:

ProdigyZeta7 wrote:

*megafacepalm* It's too easy to make.
if <boolean> then
...
else
stop [this script v]

Chainmanner wrote:

That's not really needed. After all, instead of programming a new block that says
if <var = true>
do something
else say “m00ph454”

you can just have it like this:
if <var = true>
do something
else
stop

I mean, come on now, it's just one block. It's not even commonly used.
No no no no no no and no. I meant stop the script inside the if <> then block! If you thought I meant stop the whole script, then I agree, *megafacepalm*.
I think I know what you're saying. Like an “Exit Loop” block? That'd be useful, but there's workarounds.
Scratch12300
Scratcher
500+ posts

New "if <> then" block.

turkey3 wrote:

Scratch12300 wrote:

ProdigyZeta7 wrote:

*megafacepalm* It's too easy to make.
if <boolean> then
...
else
stop [this script v]

Chainmanner wrote:

That's not really needed. After all, instead of programming a new block that says
if <var = true>
do something
else say “m00ph454”

you can just have it like this:
if <var = true>
do something
else
stop

I mean, come on now, it's just one block. It's not even commonly used.
No no no no no no and no. I meant stop the script inside the if <> then block! If you thought I meant stop the whole script, then I agree, *megafacepalm*.
I think I know what you're saying. Like an “Exit Loop” block? That'd be useful, but there's workarounds.
Yes, that's what I'm saying. What are the workarounds?
dvd4
Scratcher
100+ posts

New "if <> then" block.

Scratch12300 wrote:

turkey3 wrote:

Scratch12300 wrote:

ProdigyZeta7 wrote:

*megafacepalm* It's too easy to make.
if <boolean> then
...
else
stop [this script v]

Chainmanner wrote:

That's not really needed. After all, instead of programming a new block that says
if <var = true>
do something
else say “m00ph454”

you can just have it like this:
if <var = true>
do something
else
stop

I mean, come on now, it's just one block. It's not even commonly used.
No no no no no no and no. I meant stop the script inside the if <> then block! If you thought I meant stop the whole script, then I agree, *megafacepalm*.
I think I know what you're saying. Like an “Exit Loop” block? That'd be useful, but there's workarounds.
Yes, that's what I'm saying. What are the workarounds?
stop [script v]
Thought it would be unusable in 1s1s…
mythbusteranimator
Scratcher
1000+ posts

New "if <> then" block.

Scratch12300 wrote:

ProdigyZeta7 wrote:

*megafacepalm* It's too easy to make.
if <boolean> then
...
else
stop [this script v]

Chainmanner wrote:

That's not really needed. After all, instead of programming a new block that says
if <var = true>
do something
else say “m00ph454”

you can just have it like this:
if <var = true>
do something
else
stop

I mean, come on now, it's just one block. It's not even commonly used.
No no no no no no and no. I meant stop the script inside the if <> then block! If you thought I meant stop the whole script, then I agree, *megafacepalm*.
It is really easy just to exit a script…

Scratch12300
Scratcher
500+ posts

New "if <> then" block.

dvd4 wrote:

Scratch12300 wrote:

turkey3 wrote:

Scratch12300 wrote:

ProdigyZeta7 wrote:

*megafacepalm* It's too easy to make.
if <boolean> then
...
else
stop [this script v]

Chainmanner wrote:

That's not really needed. After all, instead of programming a new block that says
if <var = true>
do something
else say “m00ph454”

you can just have it like this:
if <var = true>
do something
else
stop

I mean, come on now, it's just one block. It's not even commonly used.
No no no no no no and no. I meant stop the script inside the if <> then block! If you thought I meant stop the whole script, then I agree, *megafacepalm*.
I think I know what you're saying. Like an “Exit Loop” block? That'd be useful, but there's workarounds.
Yes, that's what I'm saying. What are the workarounds?
stop [script v]
Thought it would be unusable in 1s1s…
NO. I mean only stop the script inside the if <> then block!
Scratch12300
Scratcher
500+ posts

New "if <> then" block.

mythbusteranimator wrote:

Scratch12300 wrote:

ProdigyZeta7 wrote:

*megafacepalm* It's too easy to make.
if <boolean> then
...
else
stop [this script v]

Chainmanner wrote:

That's not really needed. After all, instead of programming a new block that says
if <var = true>
do something
else say “m00ph454”

you can just have it like this:
if <var = true>
do something
else
stop

I mean, come on now, it's just one block. It's not even commonly used.
No no no no no no and no. I meant stop the script inside the if <> then block! If you thought I meant stop the whole script, then I agree, *megafacepalm*.
It is really easy just to exit a script…
Okay. How?
dvd4
Scratcher
100+ posts

New "if <> then" block.

Scratch12300 wrote:

dvd4 wrote:

Scratch12300 wrote:

turkey3 wrote:

Scratch12300 wrote:

ProdigyZeta7 wrote:

*megafacepalm* It's too easy to make.
if <boolean> then
...
else
stop [this script v]

Chainmanner wrote:

That's not really needed. After all, instead of programming a new block that says
if <var = true>
do something
else say “m00ph454”

you can just have it like this:
if <var = true>
do something
else
stop

I mean, come on now, it's just one block. It's not even commonly used.
No no no no no no and no. I meant stop the script inside the if <> then block! If you thought I meant stop the whole script, then I agree, *megafacepalm*.
I think I know what you're saying. Like an “Exit Loop” block? That'd be useful, but there's workarounds.
Yes, that's what I'm saying. What are the workarounds?
stop [script v]
Thought it would be unusable in 1s1s…
NO. I mean only stop the script inside the if <> then block!
not happy with that solution eh ? I think you'll be happy with this one…
block
if <not<condition>>
{
block
if<not<condition>>
{
block
}
}
geddit ?
Scratch12300
Scratcher
500+ posts

New "if <> then" block.

dvd4 wrote:

Scratch12300 wrote:

dvd4 wrote:

Scratch12300 wrote:

turkey3 wrote:

Scratch12300 wrote:

ProdigyZeta7 wrote:

*megafacepalm* It's too easy to make.
if <boolean> then
...
else
stop [this script v]

Chainmanner wrote:

That's not really needed. After all, instead of programming a new block that says
if <var = true>
do something
else say “m00ph454”

you can just have it like this:
if <var = true>
do something
else
stop

I mean, come on now, it's just one block. It's not even commonly used.
No no no no no no and no. I meant stop the script inside the if <> then block! If you thought I meant stop the whole script, then I agree, *megafacepalm*.
I think I know what you're saying. Like an “Exit Loop” block? That'd be useful, but there's workarounds.
Yes, that's what I'm saying. What are the workarounds?
stop [script v]
Thought it would be unusable in 1s1s…
NO. I mean only stop the script inside the if <> then block!
not happy with that solution eh ? I think you'll be happy with this one…
block
if <not<condition>>
{
block
if<not<condition>>
{
block
}
}
geddit ?
Thank you! But if you have a very loooooong script inside the if <> then block, it's easier to have what I'm suggesting.
Scratch12300
Scratcher
500+ posts

New "if <> then" block.

BUMP

Last edited by Scratch12300 (July 30, 2013 19:26:34)

Scratch12300
Scratcher
500+ posts

New "if <> then" block.

PMUB

Last edited by Scratch12300 (July 30, 2013 19:26:25)

scimonster
Scratcher
1000+ posts

New "if <> then" block.

Sorry, but i think it would be very rarely used, so i don't support.

dvd4 wrote:

not happy with that solution eh ? I think you'll be happy with this one…
block
if <not<condition>>
{
block
if<not<condition>>
{
block
}
}
geddit ?
Actually, it should be if <condition>, because you want it to run when true.
drmcw
Scratcher
1000+ posts

New "if <> then" block.

If I'm understanding what you mean correctly then you're really confusing what an if statement does. The if then statement is a branching statement so the boolean value is calculated and if true then the script inside the if then is run. The boolean value is not evaluated again. Ok you may then argue that because if then doesn't re-evaluate the boolean at each point within its enclosing script that your idea should be adopted, I'm afraid I'd have to say that it'd confuse everyone and as you've seen there are workarounds which wouldn't confuse.
Zparx
Scratcher
500+ posts

New "if <> then" block.

drmcw wrote:

If I'm understanding what you mean correctly then you're really confusing what an if statement does. The if then statement is a branching statement so the boolean value is calculated and if true then the script inside the if then is run. The boolean value is not evaluated again. Ok you may then argue that because if then doesn't re-evaluate the boolean at each point within its enclosing script that your idea should be adopted, I'm afraid I'd have to say that it'd confuse everyone and as you've seen there are workarounds which wouldn't confuse.

I agree. If a boolean renders false, it won't execute the scripts inside the if block, much like your suggestion. The difference between your suggestion and a regular true/false boolean are so small that it won't matter enough to implement. It's good that you're brainstorming, though! Scratch definitely needs new ideas (:

Last edited by Zparx (July 30, 2013 20:14:47)

Scratch12300
Scratcher
500+ posts

New "if <> then" block.

Bippity-boppity bump.
PERCE-NEIGE
Scratcher
100+ posts

New "if <> then" block.

No offense, but I think you don't know how to use the “if” block.

You have to code with the “if… else” block

IF
—do this
ELSE
—stop this script

So, it's totally useless, because that's already exist in another form.

Scratch is made to give you basic block that exist in most of the programming language, this kind of block you ask for, I never see it in any of them, (tell me if I'm wrong)

Powered by DjangoBB