Discuss Scratch

MillionOfficial
Scratcher
500+ posts

Block as a Parameter in Custom Blocks

UwU (move (10) steps :: motion stack) :: custom
UwU (:: #000 stack) :: custom
define (UwU (block in block :: custom stack) :: custom stack)

Example:

run (play sound [Meow v] :: sound stack) :: custom

define (run (block :: custom stack) :: custom stack)
block :: custom // plays the infamous Meow sound

Last edited by MillionOfficial (Oct. 23, 2024 22:45:24)

ThisIsTemp1
Scratcher
1000+ posts

Block as a Parameter in Custom Blocks

Easy workaround

define hi
play sound [Meow v]

hi :: custom blocks

Unless I’m misunderstanding.

Last edited by ThisIsTemp1 (Oct. 23, 2024 22:56:48)

ProjectFactory
Scratcher
100+ posts

Block as a Parameter in Custom Blocks

What's the point of this? How would this work? How would it be better than just simply making a custom reporter inside the custom block that does basically the same thing?
TheCreatorOfUnTV
Scratcher
1000+ posts

Block as a Parameter in Custom Blocks

This is what λSnap! is for.
Scratchedbyyou_forum
Scratcher
100+ posts

Block as a Parameter in Custom Blocks

What you mean is custom c-blocks right?

Better example:
define Thing (Blocks::custom stack)

Thing{
}::custom

Last edited by Scratchedbyyou_forum (Nov. 16, 2024 07:24:34)

scratchcode1_2_3
Scratcher
1000+ posts

Block as a Parameter in Custom Blocks

Unless I misunderstood, this is just redundant.
Scratchedbyyou_forum
Scratcher
100+ posts

Block as a Parameter in Custom Blocks

ThisIsTemp1 wrote:

Easy workaround

define hi
play sound [Meow v]

hi :: custom blocks

Unless I’m misunderstanding.
That's not gonna workaround custom c-blocks.

ProjectFactory wrote:

What's the point of this? How would this work? How would it be better than just simply making a custom reporter inside the custom block that does basically the same thing?
You can't put normal blocks inside a reporter input.

scratchcode1_2_3 wrote:

Unless I misunderstood, this is just redundant.
What? There are some uses. (If only I remembered them )

Last edited by Scratchedbyyou_forum (Oct. 23, 2024 23:33:59)

scratchcode1_2_3
Scratcher
1000+ posts

Block as a Parameter in Custom Blocks

Scratchedbyyou_forum wrote:

(#7)

ThisIsTemp1 wrote:

Easy workaround

define hi
play sound [Meow v]

hi :: custom blocks

Unless I’m misunderstanding.
That's not gonna workaround custom c-blocks.

ProjectFactory wrote:

What's the point of this? How would this work? How would it be better than just simply making a custom reporter inside the custom block that does basically the same thing?
You can't put normal blocks inside a reporter input.

scratchcode1_2_3 wrote:

Unless I misunderstood, this is just redundant.
What? There are some uses. (If only I remembered them )
Why would I make a block to use another block when I can just call the block directly or use it normally inside the block?
Scratchedbyyou_forum
Scratcher
100+ posts

Block as a Parameter in Custom Blocks

scratchcode1_2_3 wrote:

Scratchedbyyou_forum wrote:

-snip-
Why would I make a block to use another block when I can just call the block directly or use it normally inside the block?
The same reason you would make a custom block (If you exclude the screen refresh option)
define repeat for (secs::custom) seconds (code::custom stack)
reset timer
repeat until <(timer) > (secs::custom)>
code::custom
end

repeat for () seconds{
}::custom

Last edited by Scratchedbyyou_forum (Nov. 16, 2024 07:23:37)

scratchcode1_2_3
Scratcher
1000+ posts

Block as a Parameter in Custom Blocks

Scratchedbyyou_forum wrote:

(#9)

scratchcode1_2_3 wrote:

Scratchedbyyou_forum wrote:

-snip-
Why would I make a block to use another block when I can just call the block directly or use it normally inside the block?
The same reason you would make a custom block (If you exclude the screen refresh option)
define repeat for (secs::custom) seconds (code::custom stack)
reset timer
repeat until <(timer) > (secs::custom)>
code::custom
end

repeat for () seconds{}::custom
Fair point. Has a easy workaround, but fair point.
glitcX
Scratcher
1000+ posts

Block as a Parameter in Custom Blocks

It's a little annoying when most people use the phrase
It'll confuse New Scratchers.
But this time I have to say it.
MillionOfficial
Scratcher
500+ posts

Block as a Parameter in Custom Blocks

ThisIsTemp1 wrote:

Easy workaround

define hi
play sound [Meow v]

hi :: custom blocks

You misunderstood, look at the example

Powered by DjangoBB