Discuss Scratch

Scratch12300
Scratcher
500+ posts

New "if <> then" block.

PERCE-NEIGE wrote:

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)
Why doesn't anyone understand?! I meant it would stop only the script inside the if <> then block!!!!!!!!!!
ProdigyZeta7
Scratcher
1000+ posts

New "if <> then" block.

Scratch12300 wrote:

PERCE-NEIGE wrote:

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)
Why doesn't anyone understand?! I meant it would stop only the script inside the if <> then block!!!!!!!!!!
I know what you mean: you want it to stop block-wise, not script-wise. Correct? Well, that would slow the script down because it would have to make a boolean check every block, which can get expensive. And boolean changes while the computer is executing code within an if statement is impossible if you know how a computer handles code.
seanbobe
Scratcher
500+ 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 this script

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*.
Forever:if <condition>
part 1 of script
else:
broadcast part 2
stop this script

when i receive part 2
part 2 of script
is that what you mean?

Last edited by seanbobe (Aug. 3, 2013 16:59:37)

mitchboy
Scratcher
1000+ posts

New "if <> then" block.

I think what you're asking for is essentially another “repeat until” block…

Powered by DjangoBB