Discuss Scratch

ihavenocluewhythisis
Scratcher
500+ posts

custom c blocks

here is the else-if block made using this:

define if <boolean> {script::custom} else-if <boolean2> {script2::custom} else {script3::custom}
if <boolean> then
script::custom
end
if <<not<boolean>>and<boolean2::custom>> then
script2::custom
end
if <not<<boolean> and<boolean2::custom>>> then
script3::custom
end
it would also look like a c block, like this!
if <> {
} else if <> {
} else {
} :: custom

edit: might as well take a mockup from a dupe of this topic.
its kinda big

Last edited by ihavenocluewhythisis (Dec. 11, 2024 23:49:46)

han614698
Scratcher
1000+ posts

custom c blocks

define {top text <condit 1::custom-arg>{

}mid text{

}bottom text::custom}


seems really clunky and also kinda useless ngl
ihavenocluewhythisis
Scratcher
500+ posts

custom c blocks

han614698 wrote:

define {top text <condit 1::custom-arg>{
}mid text{
}bottom text::custom}


seems really clunky and also kinda useless ngl
I just showed you the format, the define doesnt have vertical structure, only the block.

edit: the st probably wont consider this design because its too big

Last edited by ihavenocluewhythisis (Dec. 11, 2024 23:52:01)

han614698
Scratcher
1000+ posts

custom c blocks

ihavenocluewhythisis wrote:

(#3)

han614698 wrote:

define {top text <condit 1::custom-arg>{

}mid text{

}bottom text::custom}


seems really clunky and also kinda useless ngl
I just showed you the format, the define doesnt have vertical structure, only the block.
i know i was making a better format idea
BigNate469
Scratcher
1000+ posts

custom c blocks

Can't this already be done?
define some block <boolean 1> (script 1)
if <boolean 1> then
broadcast (script 1)
end

when I receive [message from script 1 v]
...

Also, how is that any different from just a
if <some boolean> then
...
end
we want callback functions in Scratch now?

Last edited by BigNate469 (Nov. 18, 2024 00:54:30)

han614698
Scratcher
1000+ posts

custom c blocks

Exactly - really the only C blocks you'd ever need already exist in Scratch.
ihavenocluewhythisis
Scratcher
500+ posts

custom c blocks

BigNate469 wrote:

Can't this already be done?
define some block <boolean 1> (script 1)
if <boolean 1> then
broadcast (script 1)
end

when I receive [message from script 1 v]
...

Also, how is that any different from just a
if <some boolean> then
...
end
we want callback functions in Scratch now?
this can be used for other things than those, i had an EXAMPLE be an elif (because that's the most useful example I could make) but it could be literally anything else

Last edited by ihavenocluewhythisis (Nov. 18, 2024 01:15:22)

ihavenocluewhythisis
Scratcher
500+ posts

custom c blocks

han614698 wrote:

ihavenocluewhythisis wrote:

(#3)

han614698 wrote:

define {top text <condit 1::custom-arg>{

}mid text{

}bottom text::custom}


seems really clunky and also kinda useless ngl
I just showed you the format, the define doesnt have vertical structure, only the block.
i know i was making a better format idea
why make it if its bad
han614698
Scratcher
1000+ posts

custom c blocks

ihavenocluewhythisis wrote:

(#8)

han614698 wrote:

ihavenocluewhythisis wrote:

(#3)

han614698 wrote:

define {top text <condit 1::custom-arg>{

}mid text{

}bottom text::custom}


seems really clunky and also kinda useless ngl
I just showed you the format, the define doesnt have vertical structure, only the block.
i know i was making a better format idea
why make it if its bad
I don't think that my mockup is bad.

I was saying that the entire idea seems clunky and useless, and that I still thought my mockup would work instead of the one in the OP.
TheCreatorOfUnTV
Scratcher
1000+ posts

custom c blocks

I can't think of any program-specific C-blocks, and most of the more general C-blocks require more features than just this (your example being the only exception) and so would be better off as their own suggestions. (The other way would just be to turn this into Snap!, but that's a different programming language and the idea has already been unsuccessfully proposed to Scratch Team.) Most usages of commands as data are more complicated than this, and for good reason.
Mryellowdoggy
Scratcher
1000+ posts

custom c blocks

I don't understand what the function of this would be. Can you explain how this would be used?
Kpate123
Scratcher
100+ posts

custom c blocks

Work around:
if <> then   
else
if <> then
else
end
end
Anyways this isn’t where this Discussion forum should be.
ihavenocluewhythisis
Scratcher
500+ posts

custom c blocks

Kpate123 wrote:

Work around:
if <> then   
else
if <> then
else
end
end
Anyways this isn’t where this Discussion forum should be.
you just dont understand

edit: wrong topic

Last edited by ihavenocluewhythisis (Nov. 22, 2024 01:27:09)

ihavenocluewhythisis
Scratcher
500+ posts

custom c blocks

Mryellowdoggy wrote:

I don't understand what the function of this would be. Can you explain how this would be used?
you can make custom c blocks
Mryellowdoggy
Scratcher
1000+ posts

custom c blocks

ihavenocluewhythisis wrote:

Mryellowdoggy wrote:

I don't understand what the function of this would be. Can you explain how this would be used?
you can make custom c blocks
But what do they do? What is the function?
bubgamer072
Scratcher
97 posts

custom c blocks

ihavenocluewhythisis wrote:

define block {script::custom}
...
script::custom
(quote is HEAVILY edited)
this is actually a really clever implementation, good job and support!

Mryellowdoggy wrote:

ihavenocluewhythisis wrote:

Mryellowdoggy wrote:

I don't understand what the function of this would be. Can you explain how this would be used?
you can make custom c blocks
But what do they do? What is the function?
you can make things like custom if statements and loops, such as an if-elseif-else as seen in the op or maybe a for each item in list loop
bubgamer072
Scratcher
97 posts

custom c blocks

bump and support because i want to use this
ihavenocluewhythisis
Scratcher
500+ posts

custom c blocks

bubgamer072 wrote:

ihavenocluewhythisis wrote:

define block {script::custom}
...
script::custom
(quote is HEAVILY edited)
this is actually a really clever implementation, good job and support!

Mryellowdoggy wrote:

ihavenocluewhythisis wrote:

Mryellowdoggy wrote:

I don't understand what the function of this would be. Can you explain how this would be used?
you can make custom c blocks
But what do they do? What is the function?
you can make things like custom if statements and loops, such as an if-elseif-else as seen in the op or maybe a for each item in list loop
you can even make rejected blocks!

examples:

define while <boolean> {script::custom}
repeat until <not<boolean>>
script::custom
end
define forever if <boolean> {script::custom}
forever
if <boolean> then
script::custom
end
end

Last edited by ihavenocluewhythisis (Dec. 11, 2024 23:40:38)

han614698
Scratcher
1000+ posts

custom c blocks

I’d like to say this again: all the C-blocks you really could ever need already exist. It’s not like there’s infinite options here.
ihavenocluewhythisis
Scratcher
500+ posts

custom c blocks

han614698 wrote:

I’d like to say this again: all the C-blocks you really could ever need already exist. It’s not like there’s infinite options here.
Trust me, the technical community will somehow make a thing that counts each block in it. With the define block, you can make almost every block easy to make with custom blocks.

Last edited by ihavenocluewhythisis (Dec. 25, 2024 22:11:13)

Powered by DjangoBB