Discuss Scratch
- ihavenocluewhythisis
-
Scratcher
500+ posts
custom c blocks
here is the else-if block made using this:
edit: might as well take a mockup from a dupe of this topic.
its kinda big
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
endit would also look like a c block, like this!if <> {
} else if <> {
} else {
} :: customedit: might as well take a mockup from a dupe of this topic.
its kinda bigLast 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
I just showed you the format, the define doesnt have vertical structure, only the block.define {top text <condit 1::custom-arg>{
}mid text{
}bottom text::custom}
seems really clunky and also kinda useless ngl
edit: the st probably wont consider this design because its too big
Last edited by ihavenocluewhythisis (Dec. 11, 2024 23:52:01)
- BigNate469
-
Scratcher
1000+ posts
custom c blocks
Can't this already be done?
Also, how is that any different from just a
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> thenwe want callback functions in Scratch now?
...
end
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
Can't this already be done?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 elsedefine 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 aif <some boolean> thenwe want callback functions in Scratch now?
...
end
Last edited by ihavenocluewhythisis (Nov. 18, 2024 01:15:22)
- ihavenocluewhythisis
-
Scratcher
500+ posts
custom c blocks
why make it if its bad(#3)i know i was making a better format ideaI just showed you the format, the define doesnt have vertical structure, only the block.define {top text <condit 1::custom-arg>{
}mid text{
}bottom text::custom}
seems really clunky and also kinda useless ngl
- han614698
-
Scratcher
1000+ posts
custom c blocks
(#8)I don't think that my mockup is bad.why make it if its bad(#3)i know i was making a better format ideaI just showed you the format, the define doesnt have vertical structure, only the block.define {top text <condit 1::custom-arg>{
}mid text{
}bottom text::custom}
seems really clunky and also kinda useless ngl
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 <> thenAnyways this isn’t where this Discussion forum should be.
else
if <> then
else
end
end
- ihavenocluewhythisis
-
Scratcher
500+ posts
custom c blocks
Work around:you just dont understandif <> thenAnyways this isn’t where this Discussion forum should be.
else
if <> then
else
end
end
edit: wrong topic
Last edited by ihavenocluewhythisis (Nov. 22, 2024 01:27:09)
- ihavenocluewhythisis
-
Scratcher
500+ posts
custom c blocks
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
But what do they do? What is the function?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
- bubgamer072
-
Scratcher
97 posts
custom c blocks
this is actually a really clever implementation, good job and support!define block {script::custom}(quote is HEAVILY edited)
...
script::custom
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 loopBut what do they do? What is the function?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
- ihavenocluewhythisis
-
Scratcher
500+ posts
custom c blocks
you can even make rejected blocks!this is actually a really clever implementation, good job and support!define block {script::custom}(quote is HEAVILY edited)
...
script::customyou 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 loopBut what do they do? What is the function?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
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
endLast 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
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)