Discuss Scratch

Toodchop
Scratcher
100+ posts

Elif (else-if) block

I think an expandable “if” block would be nice.

if <> then {

} else if <> then @delInput {

} else @delInput {

} @addInput :: control

Last edited by Toodchop (Nov. 10, 2025 09:24:16)

Alex5002
Scratcher
100+ posts

Elif (else-if) block

Yes please !
Stacking if else E blocks is monstruous and ugly to me.
Alguien_Miitopia
Scratcher
10 posts

Elif (else-if) block

that was a scratch 1.4 feature btw
it would ACTUALLY look like this:
if <> then {



} else if <> {


}::control

Last edited by Alguien_Miitopia (Nov. 3, 2025 15:03:24)

PIXEL_BY_PIXEL_ERROR
Scratcher
500+ posts

Elif (else-if) block

Alguien_Miitopia wrote:

that was a scratch 1.4 feature btw
it would ACTUALLY look like this:
if <> then 



else if <>



end
end
I think k you got confused with the
forever if {
...
}‍::events
CodeComet6161
Scratcher
1000+ posts

Elif (else-if) block

if <needs this block::operators> then{
say [bump]
}else if <doesn't need this block::operators> then{
set [need for elif v] to [true]
}else{
wait until <this block is implemented::operators>
}::control
Toodchop
Scratcher
100+ posts

Elif (else-if) block

Support.

Last edited by Toodchop (Nov. 21, 2025 14:32:27)

mtaka4
Scratcher
500+ posts

Elif (else-if) block

Toodchop wrote:

Support.
Please explain why you support. The forums aren't a ballot box.
kip23s
Scratcher
500+ posts

Elif (else-if) block

bump
dizzyboy42
Scratcher
1000+ posts

Elif (else-if) block

kip23s wrote:

bump
please explain why you bump the forums aren't a- wait what

jokes aside, no support just putting multiple “if else” blocks inside each other works
Ym2612
Scratcher
100+ posts

Elif (else-if) block

how would something like this
if <> then 
...


else
if <> then
...
end
...
end
work with an elif block?
medians
Scratcher
1000+ posts

Elif (else-if) block

Ym2612 wrote:

how would something like this
if <> then 
...


else
if <> then
...
end
...
end
work with an elif block?
In that case, you could just do that or do this:
if <bool1::grey> then {
code1::grey
} else if <bool2::grey> {
code2::grey
code3::custom
} else {
code3::custom
}::control
You don't have to use an else if/elif block in all cases
Ym2612
Scratcher
100+ posts

Elif (else-if) block

medians wrote:

Ym2612 wrote:

how would something like this
if <> then 
...


else
if <> then
...
end
...
end
work with an elif block?
In that case, you could just do that or do this:
if <bool1::grey> then {
code1::grey
} else if <bool2::grey> {
code2::grey
code3::custom
} else {
code3::custom
}::control
You don't have to use an else if/elif block in all cases
in that case, I support, this block would really help with project cleanliness
PIXEL_BY_PIXEL_ERROR
Scratcher
500+ posts

Elif (else-if) block

people have gotten so lazy they can just drag another else if block in there…

…but I hate it when I choose a
if <> then

end
instead of
if <> then 



else

end
so support
galaxylegend_lelo
Scratcher
100+ posts

Elif (else-if) block

AonymousGuy wrote:

What would this look like? Would it be multiple ifs part of one block?
if <foobars ::operators> then ::loop
...
else




if <<foodoobar ::sensing> and<Quisque feugiat ipsum.::variables>> then


...
end
but merge else with the other if

Powered by DjangoBB