Discuss Scratch
- Discussion Forums
- » Suggestions
- » Ideas For New Commands!
- Sharp-Shark
- Scratcher
22 posts
Ideas For New Commands!
So,i feel like there could be more commands,i know Python and it's pretty like Scratch,Scratch and Py. look like brothers but there are things that Py. has and Scratch don't!
But :
But :
forever
say [I still love scratch!] for (2) secs
end
- Sharp-Shark
- Scratcher
22 posts
Ideas For New Commands!
1 Idea for new block (Based on Py.) : Return() !!!!
It's use :
So 1st,i think that it should work like this :
If inside a custom block it has Return() it will also appear has a () ,just like a variable do!But it will be like a inside Scratch custom sensor/operator,so return just makes you be able to have more than (()+()) , now you could have ()^() with a block that has a return.
Exemple :
It's use :
So 1st,i think that it should work like this :
If inside a custom block it has Return() it will also appear has a () ,just like a variable do!But it will be like a inside Scratch custom sensor/operator,so return just makes you be able to have more than (()+()) , now you could have ()^() with a block that has a return.
Exemple :
define power (x) (y)——————————————————
set [a v] to [x]
repeat (y)
set [a v] to ((a) * (a))
end
return(a)
when green flag clicked
ask (sqrt of?) and wait
say (power(answer)(0.5)) for (2) secs
Last edited by Sharp-Shark (Sept. 22, 2017 14:13:50)
- Sharp-Shark
- Scratcher
22 posts
Ideas For New Commands!
That's just what i did with You can't just say “I want more commands.” That's not how this forum works. Please provide specific examples of which ‘commands’ you would like added and why they would be useful or your suggestion will not be taken seriously.
(return(x))And also,here you are supposed to say ideas for new commands/blocks!No bad language but you can make questions of utility and etc.
Last edited by Sharp-Shark (Sept. 22, 2017 15:20:49)
- Sharp-Shark
- Scratcher
22 posts
Ideas For New Commands!
So,actually return has a really,really good use,imagine you wanna make a custom block which receives a txt. and then returns with a list with every single word?Obviously you could make at the end :That's just what i did with You can't just say “I want more commands.” That's not how this forum works. Please provide specific examples of which ‘commands’ you would like added and why they would be useful or your suggestion will not be taken seriously.(return(x)(y))
Yes, your post came several minutes after mine. It's fine if you were still brainstorming, but in the future it would probably be best to compile and flesh out your idea(s) before creating a thread and put them in the original post when you are ready to do so instead of gradually adding more and more posts to the thread with more and more block suggestions. Just gets a little… spammy after a while. I have no real opinion on your suggestion itself - I have never used Python and I don't see much of a purpose for this block.
set [X v] to [Y]And then use X.But there are reasons for return to be better.Oh,also i noticed an error on return,i will fix it!
Fixed!
Last edited by Sharp-Shark (Sept. 22, 2017 14:16:59)
- Sharp-Shark
- Scratcher
22 posts
Ideas For New Commands!
Again,more Py. stuff,but now i will show something that can be easily done with scratch and it is : Elif - A mix with else and if!
if <>{So the Block thing cannot make elif with the same format as a if but if it could i could make it look better,that's all,elif is just an exception that both needs that the if to fail and it's condition to be true!
...} :: control
elif <>{
...} :: control
Last edited by Sharp-Shark (Sept. 22, 2017 15:19:43)
- Botcho_Otkho
- Scratcher
1000+ posts
Ideas For New Commands!
1 Idea for new block (Based on Py.) : Return() !!!!
It's use :
So 1st,i think that it should work like this :
If inside a custom block it has Return() it will also appear has a () ,just like a variable do!But it will be like a inside Scratch custom sensor/operator,so return just makes you be able to have more than (()+()) , now you could have ()^() with a block that has a return.
Exemple :define power (x) (y)——————————————————
set [a v] to [x]
repeat (y)
set [a v] to ((a) * (a))
end
return(a)::custom cap
when green flag clicked
ask (sqrt of?) and wait
say (power(answer)(0.5)) for (2) secs
Custom block shape is being implemented in Scratch 3.0. Also,like @Teotihuacan said,be more specific and leave an example of how these “commands” work and what they would be.
Anyway,Scratch is not PY. You can convert PY features to Scratch.
I see now that the circumstances of one's birth are irrelevant. It is what you do with the gift of life that determines who you are. - Mewtwo
- Sharp-Shark
- Scratcher
22 posts
Ideas For New Commands!
A ‘repeat ()’ updated version!
look at this example for use of the new version!
0
1
2
…Until 100…
Let's make a “2D” text world in a list with the new one and the old one!
ooo
ooo
ooo
Also as soon as a count loop ends,it's
Here it is!Something i had done on Workaround but i noticed it's workaround it isn't 100% functional and decided to bring it here!
with counter ([a] :: control) count to (0),(1) {That is the new version.The new proposed version is based on the Python : ‘for _ in _ :’!
...} :: control
look at this example for use of the new version!
when green flag clickedThe output would be :
with counter ([a] :: control) count to (0),(100) {
say ([a] :: control)
wait (1) secs
say [] } :: control
0
1
2
…Until 100…
Let's make a “2D” text world in a list with the new one and the old one!
when green flag clickedThe list ‘c’ would be like this :
with counter ([a] :: control) count to (1),(3) {
insert [] at (length of [c v] :: list) of [c v]
repeat (3)
replace item ([a] :: control v) of [c v] with (join (item ([a] :: control v) of [c v] :: list) [o])
end} :: control
ooo
ooo
ooo
Also as soon as a count loop ends,it's
([X] :: control v)will be acessible but if another loop uses it,it will be reseted for the new loop use!Also,i don't wanna remove
repeat ()i just wanna add a new,very useful block!
Here it is!Something i had done on Workaround but i noticed it's workaround it isn't 100% functional and decided to bring it here!
- Sharp-Shark
- Scratcher
22 posts
Ideas For New Commands!
New Py. based stuff!
So i cannot make something to define break but it is something that breaks a loop.
Sorry for spamming but here spam is kind of allowed…
Yes i readed your thingy about that not everything in Py. can be converted into Scratch and i know it,there are things that i will never try such as classes!
Also,remember,here,every block idea has to have a function.Don't suggest a block like this one :
break :: control
repeat (10)
move (1) steps
if <key [space v] pressed?> then
break :: control
end
end
So i cannot make something to define break but it is something that breaks a loop.
Sorry for spamming but here spam is kind of allowed…
Yes i readed your thingy about that not everything in Py. can be converted into Scratch and i know it,there are things that i will never try such as classes!
Also,remember,here,every block idea has to have a function.Don't suggest a block like this one :
Ignore this block. :: greyAlso,you can suggest another sensor,boolean,operator and etc(i say this because they aren't considered blocks).Look at this example :
<< > xor < > :: operators>(For those who don't know,xor means : if only one < > is True)
Last edited by Sharp-Shark (Sept. 22, 2017 17:11:50)
- DaEpikDude
- Scratcher
1000+ posts
Ideas For New Commands!
(updated duplicates below)
Last edited by DaEpikDude (Sept. 23, 2017 22:10:15)
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!
- Cytoceon
- Scratcher
11 posts
Ideas For New Commands!
Anything you can do with Python can be done with Scratch. This isn't limited to Python - it applies to almost any programming language. Again,more Py. stuff,but now i will show something that can be easily done with scratch and it is : Elif - A mix with else and if!if <>{So the Block thing cannot make elif with the same format as a if but if it could i could make it look better,that's all,elif is just an exception that both needs that the if to fail and it's condition to be true!
...} :: control
elif <>{
...} :: control
In this case, you could make programming much less confusing for kids using:
if <> thenNo functionality loss and much easier to explain.
else
if <> then
end
end
Your OP was also very unspecific. You don't just say “I want more functions!' - you say ”I want this function from Python:".
- Cytoceon
- Scratcher
11 posts
Ideas For New Commands!
You don't ask people to suggest things on a suggestion post. You ask people for their opinions. New Py. based stuff!break :: control
repeat (10)
move (1) steps
if <key [space v] pressed?> then
break :: control
end
end
snip
Also,remember,here,every block idea has to have a function.Don't suggest a block like this one :Ignore this block. :: greyAlso,you can suggest another sensor,boolean,operator and etc(i say this because they aren't considered blocks).Look at this example :<< > xor < > :: operators>snip
Xor is a very limited function and honestly I can't think of anything on Scratch where you would actually *need* it.
Also, xor in this case is just “if one true and one false”. Xor's usual use is to check multiple booleans. Usually 3.
And, since xor is as described above, it's very very easy to make a workaround for it.
Remember - Scratch is not supposed to be advanced. Scratch is aimed at kids.
EDIT: and “break” can be replaced with
forever
do something :: variables
if <break trigger :: operators> then
broadcast [broken v]
stop [this script v]
end
end
when I receive [broken v]
whatever would happen after the break :: grey
// And, in certain cases...
repeat until <break trigger :: operators>
do something :: variables
end
whatever would happen after the break :: grey
Last edited by Cytoceon (Sept. 23, 2017 05:06:02)
- Sharp-Shark
- Scratcher
22 posts
Ideas For New Commands!
No,break can't be defined just as that.You can break a loop inside a loop and the external loop still runs and the internal loop after broke will come back because he will be called again by the external loop.I think there's a better way to explain what i said but that you way to do a Workaround with ‘Break’ isn't 100% right.Also,why pretty much no one says anything about new blocks?Well,at least i do…You don't ask people to suggest things on a suggestion post. You ask people for their opinions. New Py. based stuff!break :: control
repeat (10)
move (1) steps
if <key [space v] pressed?> then
break :: control
end
end
snip
Also,remember,here,every block idea has to have a function.Don't suggest a block like this one :Ignore this block. :: greyAlso,you can suggest another sensor,boolean,operator and etc(i say this because they aren't considered blocks).Look at this example :<< > xor < > :: operators>snip
Xor is a very limited function and honestly I can't think of anything on Scratch where you would actually *need* it.
Also, xor in this case is just “if one true and one false”. Xor's usual use is to check multiple booleans. Usually 3.
And, since xor is as described above, it's very very easy to make a workaround for it.
Remember - Scratch is not supposed to be advanced. Scratch is aimed at kids.
EDIT: and “break” can be replaced withforever
do something :: variables
if <break trigger :: operators> then
broadcast [broken v]
stop [this script v]
end
end
when I receive [broken v]
whatever would happen after the break :: grey
// And, in certain cases...
repeat until <break trigger :: operators>
do something :: variables
end
whatever would happen after the break :: grey
Last edited by Sharp-Shark (Sept. 23, 2017 16:41:48)
- Harakou
- Scratcher
1000+ posts
Ideas For New Commands!
Thanks for your suggestions! However, do keep in mind a couple things: Firstly, Scratch isn't Python! While there are some fundamental ideas that are similar, these are found in almost every programming language around. They are made with different design goals, so just because something is good for Python doesn't mean it's good for Scratch. Please also don't make catch-all threads intended for many different blocks, or for many different people to suggest whatever they want. It's much better for forum organization to make sure that each thread is about a pretty specific idea, or at least closely related ones. Finally, do check out the threads linked by DaEpikDude above, because many of your ideas have been suggested already, and you should support them on the existing threads!
- Discussion Forums
- » Suggestions
- » Ideas For New Commands!