Discuss Scratch
- Discussion Forums
 - » Suggestions
 - » Custom c blocks and hat blocks
        
         
- HighlaneGamingStudio
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
Custom c blocks and hat blocks
Support for custom c-blocks. Not sure about hats, because hats respond to events and all events already have a hat associated with them.There's no “when
- HighlaneGamingStudio
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
Custom c blocks and hat blocks
The stop sign emoji worked fine in the preview but deleted everything after it once I posted it.Support for custom c-blocks. Not sure about hats, because hats respond to events and all events already have a hat associated with them.There's no "when stop sign clicked" block.
- -Matteo8-
 - 
                            
						
						
                            Scratcher
                        
						
						 
12 posts
Custom c blocks and hat blocks
what is the code for c blocks?
well, this could only work for blocks like this.
it's pretty easy! look:
then when you add a { onto it, then it should work!
i don't think it will work for E blocks, but here's a scratch mod that can help you with making custom c blocks!: Clip CC
go to my blocks, make a block and then click “add a branch”
im pretty sure it wont work if you export it onto a scratch project, though it may make a undefined hat block. but you can try it!
                        
                        
                    well, this could only work for blocks like this.
move () steps{so you'd use a normal block, then add a { and add a space for it.it's pretty easy! look:
when flag clicked
then when you add a { onto it, then it should work!
i don't think it will work for E blocks, but here's a scratch mod that can help you with making custom c blocks!: Clip CC
go to my blocks, make a block and then click “add a branch”
im pretty sure it wont work if you export it onto a scratch project, though it may make a undefined hat block. but you can try it!
- TheCreatorOfUnTV
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
Custom c blocks and hat blocks
So, you are suggesting that something like this:
This is probably not going to happen without this block from Snap!:
                        
                        
                    (for (i ↑) from (start = 1) to (end = 10) (action λ) :: control stack) :: control hatwill be possible, right?
set (i) to (start)
repeat until <(i) > (end :: variables)>
run (action λ) @addInput :: control
change (i) by (1)
end
This is probably not going to happen without this block from Snap!:
run (action λ) @addInput :: controlwhich would significantly increase the complexity of Scratch, and at that point you may as well use Snap! instead of Scratch.
- flynnremo2
 - 
                            
						
						
                            Scratcher
                        
						
						 
19 posts
Custom c blocks and hat blocks
when someone replied
say [oh ok]
but clipCC editor looks like another version of scratch but with new blocks
- -Matteo8-
 - 
                            
						
						
                            Scratcher
                        
						
						 
12 posts
Custom c blocks and hat blocks
So, you are suggesting that something like this:not exactly, you press return/enter on your keyboard and it shows up like a c block(for (i ↑) from (start = 1) to (end = 10) (action λ) :: control stack) :: control hatwill be possible, right?
set (i) to (start)
repeat until <(i) > (end :: variables)>
run (action λ) @addInput :: control
change (i) by (1)
end
This is probably not going to happen without this block from Snap!:run (action λ) @addInput :: controlwhich would significantly increase the complexity of Scratch, and at that point you may as well use Snap! instead of Scratch.
- -Matteo8-
 - 
                            
						
						
                            Scratcher
                        
						
						 
12 posts
Custom c blocks and hat blocks
it does. but scratch doesn't have the branch feature.
                        
                        
                    - -Matteo8-
 - 
                            
						
						
                            Scratcher
                        
						
						 
12 posts
Custom c blocks and hat blocks
to make custom hat blocks, just make a random block that is a stack and doesnt exist, then add “ :: hat” on the end of it
                        
                        
                    - flynnremo2
 - 
                            
						
						
                            Scratcher
                        
						
						 
19 posts
Custom c blocks and hat blocks
to make custom hat blocks, just make a random block that is a stack and doesnt exist, then add “ :: hat” on the end of itlike
when [Fn v] key pressed :: hat
- -Matteo8-
 - 
                            
						
						
                            Scratcher
                        
						
						 
12 posts
Custom c blocks and hat blocks
yesto make custom hat blocks, just make a random block that is a stack and doesnt exist, then add “ :: hat” on the end of itlikewhen [Fn v] key pressed :: hat
- mumu245
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
Custom c blocks and hat blocks
Example of hat definition:
                        
                        
                    define hat ::hat
forever
wait until (my condition) // will run when it becomes true
run me ::custom // run the blocks below
wait until <not (my condition)> // wait for it to become false, then true again
end
- MathStudios
 - 
                            
						
						
                            Scratcher
                        
						
						 
40 posts
Custom c blocks and hat blocks
define {scripts inside block :: custom}
scripts inside c block :: customLast edited by MathStudios (Feb. 7, 2025 22:46:16)
- MathStudios
 - 
                            
						
						
                            Scratcher
                        
						
						 
40 posts
Custom c blocks and hat blocks
define {run script under hat block :: custom}
run script under hat block :: customLast edited by MathStudios (Feb. 7, 2025 22:45:53)
- codeisBOOM
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
Custom c blocks and hat blocks
a better way to make a c block is that when making the block there is an option for making it a c block
also it will automatically add an end block and you can pull out a loop block before “define” is typed
                        
                        
                    also it will automatically add an end block and you can pull out a loop block before “define” is typed
[loop(type here) v] define c blocki cant show this because of limits
end
- jmb1293634
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
Custom c blocks and hat blocks
how about it was like this:
                        
                        
                    define{custom c-loop{
block input::custom
}::customand then you could use the block input anywhere under it- jmb1293634
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
Custom c blocks and hat blocks
Idea: broadcast boolean.please make your own topic and also that is rejected here
How this would work:
It would work as a “when I receive ” block, but in a boolean format.
1.1 “broadcast recived” boolean block
This in theory would allow a project to detect when a broadcast is sent, but there is ambiguity on how this would work. Would it return true if the broadcast was run at any point after the green flag was clicked, or only on the instant the broadcast was run, or something else? The workaround is simple: use variables that change when a broadcast is received, then use the “equals” block.
However, the blocks “repeat until broadcast received” and “wait until broadcast received” are NOT rejected. You can discuss them on this topic[message v] recieved::events boolean
- c0der0928
 - 
                            
						
						
                            Scratcher
                        
						
						 
100+ posts
Custom c blocks and hat blocks
you write
                        
                        
                    while <> {
} :: customnotwhile <> :: custom
end :: custom
- flynnremo2
 - 
                            
						
						
                            Scratcher
                        
						
						 
19 posts
Custom c blocks and hat blocks
Another idea for custom c blocks 
this block shows if any scripts inside a custom c block or not
also this has a dropdown of custom c block names. it is probably useful because for some reasons.
                        
                        
                    <blocks are placed in [ blocks1 v] ? :: custom >
this block shows if any scripts inside a custom c block or not
also this has a dropdown of custom c block names. it is probably useful because for some reasons.
- MathStudios
 - 
                            
						
						
                            Scratcher
                        
						
						 
40 posts
Custom c blocks and hat blocks
Example of hat definition:define hat ::hat
forever
wait until (my condition) // will run when it becomes true
run me ::custom // run the blocks below
wait until <not (my condition)> // wait for it to become false, then true again
end
yeah, but think about when key pressed. it doesn't wait until you stop pressing it
say [you forgot some facts buddy]
- flynnremo2
 - 
                            
						
						
                            Scratcher
                        
						
						 
19 posts
Custom c blocks and hat blocks
place with {
} [under v] each blocks while {
}  :: customthis block has a dropdown and it only has 2 options: on and underthe first branch uses blocks to put in each blocks in while branch
the while branch is running scripts
for example:
place with {
wait (1) secs
} [under v] each blocks while {
say [hello]
think [hmmm...]
}  :: customthis script is likely similar tosay [hello]
wait (1) secs
think [hmmm...]
wait (1) secs
- Discussion Forums
 - » Suggestions
 - 
            » Custom c blocks and hat blocks 
         
            







