Discuss Scratch

Grant70
Scratcher
34 posts

Super control blocks!

These awesome Super blocks Will make scratch sparkle!

Last edited by Grant70 (Sept. 10, 2017 22:43:49)


This is a signature. Or is it?
Grant70
Scratcher
34 posts

Super control blocks!

when green flag clicked
add (script/block{play sound [pop v]} :: control) to [list v]
run blocks from var/list (list :: list) :: control
Is a sample script.

Last edited by Grant70 (Sept. 10, 2017 22:44:11)


This is a signature. Or is it?
DaEpikDude
Scratcher
1000+ posts

Super control blocks!

What would be some uses for these?
I can't see any reason to use these over more blocks: why would you need to modify scripts within a program?
If you did, just add some inputs to your block that makes it run differently depending on what the input is.
No support.
side note: why do you keep moving accounts?

And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
Charles12310
Scratcher
1000+ posts

Super control blocks!

DaEpikDude wrote:

What would be some uses for these?
I can't see any reason to use these over more blocks: why would you need to modify scripts within a program?
If you did, just add some inputs to your block that makes it run differently depending on what the input is.
No support.
side note: why do you keep moving accounts?
It might be if the user is simulating a Scratch editor, and it would take a long time to detect.


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
DaEpikDude
Scratcher
1000+ posts

Super control blocks!

Charles12310 wrote:

DaEpikDude wrote:

-snip-
It might be if the user is simulating a Scratch editor, and it would take a long time to detect.
I guess, but instead of being a list, it should probably be a new data type (not sure what to call it, maybe “code stacks”?).
What if you run the list 1, 2, 3? What would happen? What if most of the list is blocks, but then there's a 9 or something?
I suppose there are uses, but fairly limited. Changing to semi-support: I don't see myself using it, and I don't see many others using it.

Edit: darnit, keep forgetting that square brackets are used for BBcode!

Last edited by DaEpikDude (Sept. 10, 2017 23:53:27)


And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
Charles12310
Scratcher
1000+ posts

Super control blocks!

DaEpikDude wrote:

Charles12310 wrote:

DaEpikDude wrote:

-snip-
It might be if the user is simulating a Scratch editor, and it would take a long time to detect.
I guess, but instead of being a list, it should probably be a new data type (not sure what to call it, maybe “code stacks”?).
What if you run the list ? What would happen? What if most of the list is blocks, but then there's a 9 or something?
I suppose there are uses, but fairly limited. Changing to semi-support: I don't see myself using it, and I don't see many others using it.
Yeah, that may be a problem. Maybe a solution is that the system ignores and strings in the list and only uses variables.

Maybe there could be this thing called “temporary script lines”. You could create any hat block with a script name:

temporary script [script v] :: hat grey

Then there would be these blocks:

add block (move (10) steps :: motion stack ) to temporary script [script v] :: grey

insert block (move (10) steps :: stack ) to line (2) to temporary script [script v] :: grey

delete line (2) of temporary script [script v] :: grey

replace line (2) of temporary script [script v] with block (move (10) steps :: stack ) :: grey

(blocks of line (2) of temporary script [script v] :: grey )

(total # of lines of temporary script [script v] :: grey )

<temporary script [script v] has blocks (move (10) steps :: stack)? :: grey >

// finally:

run temporary script [script v] :: grey

stop temporary script [script v] :: grey

run temporary script [script v] from line (2) :: grey

run line (2) of temporary script [script v] :: grey

When any add/replace/delete block is used, the script of the hat block will change. Of course, this could be easy simulation of broadcasts and custom blocks, but the only one where you can change programs.

Do you think I should make a separate topic about this?


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
DaEpikDude
Scratcher
1000+ posts

Super control blocks!

Charles12310 wrote:

-snippity snip snip-

That seems like a better idea that running lists. Should it be under “more blocks”? Under a new tab?
Since Scratch 3 doesn't have the whole “two-column” tab design, a new tab could be a possibility.
I just have a few questions:
1: Would C blocks count as lines? Like, if you run an if statement, would it run all code inside it as well? What if you run code inside the if statement?
2: Would this sort of stuff have recursion (e.g. can you make something that under certain circumstances runs the script again)?

I support that idea of temporary scripts: it seems much more understandable than running lists.
Also, maybe you should.

And all the world over, each nation's the same,
They've simply no notion of playing the game.
They argue with umpires, they cheer when they've won,
And they practice beforehand, which ruins the fun!
da-maker
Scratcher
100+ posts

Super control blocks!

Grant70 wrote:

when green flag clicked
add (script/block{play sound [pop v]} :: control) to [list v]
run blocks from var/list (list :: list) :: control
Is a sample script.
That reminds me of BYOB or Snap!

This is a signature, for any new forum users wondering. I find this topic rather interesting.

[color=#aaa][i]Last edited by kaj (Tomorrow 00:00:00)[/i][/color]
Charles12310
Scratcher
1000+ posts

Super control blocks!

DaEpikDude wrote:

Charles12310 wrote:

-snippity snip snip-

That seems like a better idea that running lists. Should it be under “more blocks”? Under a new tab?
Since Scratch 3 doesn't have the whole “two-column” tab design, a new tab could be a possibility.
I just have a few questions:
1: Would C blocks count as lines? Like, if you run an if statement, would it run all code inside it as well? What if you run code inside the if statement?
2: Would this sort of stuff have recursion (e.g. can you make something that under certain circumstances runs the script again)?

I support that idea of temporary scripts: it seems much more understandable than running lists.
Also, maybe you should.
Yeah, probably an “Advanced Blocks Section”.


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
Charles12310
Scratcher
1000+ posts

Super control blocks!

Charles12310 wrote:

DaEpikDude wrote:

Charles12310 wrote:

-snippity snip snip-

That seems like a better idea that running lists. Should it be under “more blocks”? Under a new tab?
Since Scratch 3 doesn't have the whole “two-column” tab design, a new tab could be a possibility.
I just have a few questions:
1: Would C blocks count as lines? Like, if you run an if statement, would it run all code inside it as well? What if you run code inside the if statement?
2: Would this sort of stuff have recursion (e.g. can you make something that under certain circumstances runs the script again)?

I support that idea of temporary scripts: it seems much more understandable than running lists.
Also, maybe you should.
Yeah, probably an “Advanced Blocks Section”.
Anyway, on to the questions:
1. Yes. If it's an if statement, the system will check it it's true or false. If false, it will skip, unless it has an else.
2. if there is a run script block in the script or you can put any of these in other scripts:

repeat (any amount)
run temporary script [script v] :: grey
end

repeat until <...>
run temporary script [script v] :: grey
end

forever
run temporary script [script v] :: grey
end


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
Charles12310
Scratcher
1000+ posts

Super control blocks!

Charles12310 wrote:

DaEpikDude wrote:

Charles12310 wrote:

DaEpikDude wrote:

-snip-
It might be if the user is simulating a Scratch editor, and it would take a long time to detect.
I guess, but instead of being a list, it should probably be a new data type (not sure what to call it, maybe “code stacks”?).
What if you run the list ? What would happen? What if most of the list is blocks, but then there's a 9 or something?
I suppose there are uses, but fairly limited. Changing to semi-support: I don't see myself using it, and I don't see many others using it.
Yeah, that may be a problem. Maybe a solution is that the system ignores and strings in the list and only uses variables.

Maybe there could be this thing called “temporary script lines”. You could create any hat block with a script name:

temporary script [script v] :: hat grey

Then there would be these blocks:

add block (move (10) steps :: motion stack ) to temporary script [script v] :: grey

insert block (move (10) steps :: stack ) to line (2) to temporary script [script v] :: grey

delete line (2) of temporary script [script v] :: grey

replace line (2) of temporary script [script v] with block (move (10) steps :: stack ) :: grey

(blocks of line (2) of temporary script [script v] :: grey )

(total # of lines of temporary script [script v] :: grey )

<temporary script [script v] has blocks (move (10) steps :: stack)? :: grey >

// finally:

run temporary script [script v] :: grey

stop temporary script [script v] :: grey

run temporary script [script v] from line (2) :: grey

run line (2) of temporary script [script v] :: grey

When any add/replace/delete block is used, the script of the hat block will change. Of course, this could be easy simulation of broadcasts and custom blocks, but the only one where you can change programs.

Do you think I should make a separate topic about this?
I forgot one block:

<temporary script [script v] is running? :: grey >


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!
Charles12310
Scratcher
1000+ posts

Super control blocks!

Charles12310 wrote:

Charles12310 wrote:

DaEpikDude wrote:

Charles12310 wrote:

DaEpikDude wrote:

-snip-
It might be if the user is simulating a Scratch editor, and it would take a long time to detect.
I guess, but instead of being a list, it should probably be a new data type (not sure what to call it, maybe “code stacks”?).
What if you run the list ? What would happen? What if most of the list is blocks, but then there's a 9 or something?
I suppose there are uses, but fairly limited. Changing to semi-support: I don't see myself using it, and I don't see many others using it.
Yeah, that may be a problem. Maybe a solution is that the system ignores and strings in the list and only uses variables.

Maybe there could be this thing called “temporary script lines”. You could create any hat block with a script name:

temporary script [script v] :: hat grey

Then there would be these blocks:

add block (move (10) steps :: motion stack ) to temporary script [script v] :: grey

insert block (move (10) steps :: stack ) to line (2) to temporary script [script v] :: grey

delete line (2) of temporary script [script v] :: grey

replace line (2) of temporary script [script v] with block (move (10) steps :: stack ) :: grey

(blocks of line (2) of temporary script [script v] :: grey )

(total # of lines of temporary script [script v] :: grey )

<temporary script [script v] has blocks (move (10) steps :: stack)? :: grey >

// finally:

run temporary script [script v] :: grey

stop temporary script [script v] :: grey

run temporary script [script v] from line (2) :: grey

run line (2) of temporary script [script v] :: grey

When any add/replace/delete block is used, the script of the hat block will change. Of course, this could be easy simulation of broadcasts and custom blocks, but the only one where you can change programs.

Do you think I should make a separate topic about this?
I forgot one block:

<temporary script [script v] is running? :: grey >
For better results, there would be a block ID for each block, like if move () steps was the first block to appear, the ID would be 1, and the turn degrees block would be 2.

(block with ID () :: grey )


A few internet communication companies want to corrupt the internet by getting rid of net neutrality. Stop Them!

Powered by DjangoBB