Discuss Scratch

FireyDeath4
Scratcher
100+ posts

New Blocks

I have some ideas for some new blocks. I'll give you the details with them.

roundtothenearest
Shortcut? No
Type: Operators
Rounds the first number to the nearest number that divides by the second number
For instance, 27 round 5 = 25, 13 round 10 = 10
^
Shortcut? No
Type: Operators
Reports the first number to the power of the second number
For instance, 4 ^ 2 = 16, 2 ^ 3 = 8
Shortcut? No
Type: Operators
Reports the first number to the root of the second number
For instance, 9 √ 2 = 3, 8 √ 3 = 2
hidemouse
Shortcut? No
Type: Control
Hides the mouse if it is not touching the settings bar above the Stage. This is useful if you want something to take the place of the real cursor.
showmouse
Shortcut? No
Type: Control
Shows the mouse if it is not visible
contains
Shortcut? Yes
Type: Operators
Reports true if the first input contains the second input. For instance “Hello World” does contain “lo W”.
pointtowardsx:y:
Shortcut? Probably
Type: Motion
Points the character toward the specified point
coloratx:y:incolor
Shortcut? No
Type: Sensing
Reports the color at the specified point in hue, saturation, brightness, red, green or blue
addcloudedvariablecalled
Shortcut? No
Type: Variables
Adds a cloud variable to the list of variables
nameofvariablevariable
Shortcut? No
Type: Variables
Reports the name of the selected variable. Useful for “if” blocks
nameoflistlist
Shortcut? No
Type: Lists
Reports the name of the selected variable. Useful for “if” blocks
iftouchingstage,enablerightclickwithoutoptions
Shortcut? No
Type: Control
Enables right click control over stage without right-click menu
letterstoof
Shortcut? Yes
Type: Operators
Reports all characters of the third input between the first input and second input
primarymousedown
Shortcut? No
Type: Sensing
Reports true if the selected mouse button is pressed

There. Too much, eh? I couldn't control the color of the blocks, and I couldn't make the starting block, "when this sprite clicked with button", so yeah. It took me a long time! I am talking to the Scratch Team. I want these blocks to appear in Scratch soon. And no, I'm not trying to be a bossy-pants.
MushroomMan99
Scratcher
100+ posts

New Blocks

Please make a separate post for each block. This is just going to confuse people.
DaSpudLord
Scratcher
1000+ posts

New Blocks

FireyDeath4 wrote:

roundtothenearest^
Semi-support, workaroundable.

FireyDeath4 wrote:

hidemouseshowmouse
Support.

FireyDeath4 wrote:

containspointtowardsx:y:
No support, workaroundable.
coloratx:y:incolor
Support.

FireyDeath4 wrote:

addcloudedvariablecalled
No support, create all cloud vars before you release the project. In fact, you can actually create a cloud list with just one cloud variable.

FireyDeath4 wrote:

nameofvariablevariablenameoflistlist
No support. If you don't know the name, then what are you going to put in the dropdown? The name? If you know the name, then why do you need that block?

FireyDeath4 wrote:

iftouchingstage,enablerightclickwithoutoptions
Semi-support, but what does the “if touching stage” mean? All sprites are constantly touching the stage.

FireyDeath4 wrote:

letterstoof
I'm confus…

FireyDeath4 wrote:

primarymousedown
Support, except it should be left and right instead of primary, like this-
leftmousedown?rightmousedown?
FireyDeath4
Scratcher
100+ posts

New Blocks

Sorry.
Here's what I mean.

Name of Variable is useful for if you're adding extra variables with hacked blocks. It also goes for lists.
The reason why I used:
contains
is because if you wanted to check if “Hello” contains “llo”, you'd have to do all of this:
joinjoinletter1ofHelloletter2ofHelloletter3ofHello=lloorjoinjoinletter2ofHelloletter3ofHelloletter4ofHello=lloorjoinjoinletter3ofHelloletter4ofHelloletter5ofHello=llo
As you can see, the site cannot cope with the giant boolean.
iftouchingstage,enablerightclickwithoutoptions
I mean this:
ifmouseistouchingstage,enablerightclickwithoutoptions

By the way, how did you control the block colour in the signature thing? I'd give ultra credit if you told me how.
DaSpudLord
Scratcher
1000+ posts

New Blocks

FireyDeath4 wrote:

Sorry.
Here's what I mean.

Name of Variable is useful for if you're adding extra variables with hacked blocks. It also goes for lists.
The reason why I used:
contains
is because if you wanted to check if “Hello” contains “llo”, you'd have to do all of this:
joinjoinletter1ofHelloletter2ofHelloletter3ofHello=lloorjoinjoinletter2ofHelloletter3ofHelloletter4ofHello=lloorjoinjoinletter3ofHelloletter4ofHelloletter5ofHello=llo
As you can see, the site cannot cope with the giant boolean.
iftouchingstage,enablerightclickwithoutoptions
I mean this:
ifmouseistouchingstage,enablerightclickwithoutoptions

By the way, how did you control the block colour in the signature thing? I'd give ultra credit if you told me how.
1. Okay, but what would go in the dropdown? Also, no support for adding variables and lists- create them beforehand. You can also use a list, which can have slots added onto it.
2. But that only works for 5-letter words. The real workaround would look like this-
definestring1containsstring2setCounterto0setOutputtofalserepeatlengthofstring1-lengthofstring2+1changeCounterby1setSubCounttoCountersetSubStringtorepeatlengthofstring2setSubStringtojoinSubStringletterSubCountofstring1changeSubCountby1ifSubString=string2thensetOutputtotrue
3. That block looks a little long. Also, how would someone bring up the right-click menu if it was disabled by the project?…
4. Just some scratchblocking knowledge. To color your blocks, at the end of each block, add two colons (a colon is the symbol with the two little stacked dots, like this –> : <– and you're adding two of those), then add the name of the block pallete section that you want the block to be colored like. For example, here are two blocks and the corresponding code-
jump

jump :: motion
jumpNotice how this block is red. This is because it has no color tags.jumpThis block looks like a motion block because it has the "motion" color tag.
You can also force existing blocks to appear in a different color using this method-
move (10) steps

mote (10) steps :: looks
move10stepsSince this block is a motion block and has no color tag, it appears as a motion block.move10stepsDespite the fact that this block is supposed to be a motion block, the "looks" tag changed the color.

Last edited by DaSpudLord (Aug. 13, 2015 02:45:55)

FireyDeath4
Scratcher
100+ posts

New Blocks

What I mean is, if one creates an account, you're going to need extra variables or lists. Because if you don't make extra ones in-game, you can only limit the amount of cloud accounts you can have. Get it now?
FireyDeath4
Scratcher
100+ posts

New Blocks

The way someone would bring up the right-click menu is only if the cursor is not touching the Stage. So, you can right-click menu anywhere in these places: script, titlebar, etc.
DaSpudLord
Scratcher
1000+ posts

New Blocks

FireyDeath4 wrote:

What I mean is, if one creates an account, you're going to need extra variables or lists. Because if you don't make extra ones in-game, you can only limit the amount of cloud accounts you can have. Get it now?
No, I do get that, but this can actually be achieved by using a cloud list engine. You can add more rows to lists as the project runs.

BTW, updated last post.

Last edited by DaSpudLord (Aug. 13, 2015 02:44:18)

FireyDeath4
Scratcher
100+ posts

New Blocks

Nevermind, I found out how.

thisishowyoudoit

Well, now I know, I forgot a few blocks.

amountofsin
Reports how many of the first input are in the second input
scramble
Randomly creates an anagram of the input
whenthisspriteclickedwithmouseclickprimarywhenthisspriteclickedwithmouseclicksecondary
Starts the script if the sprite is clicked with the selected mouse click

There.
DaSpudLord
Scratcher
1000+ posts

New Blocks

FireyDeath4 wrote:

Nevermind, I found out how.

thisishowyoudoit

Well, now I know, I forgot a few blocks.

amountofsin
Reports how many of the first input are in the second input
scramble
Randomly creates an anagram of the input
whenthisspriteclickedwithmouseclickprimarywhenthisspriteclickedwithmouseclicksecondary
Starts the script if the sprite is clicked with the selected mouse click

There.
1. Please don't blockspam. Thanks!
2. Please create a new thread for each new set of suggestions- that way everything stays neat and tidy.
FireyDeath4
Scratcher
100+ posts

New Blocks

I wasn't trying to blockspam.
koopa_land
Scratcher
100+ posts

New Blocks

Support
Paddle2See
Scratch Team
1000+ posts

New Blocks

Please make a new topic for each block you are suggesting so that the conversation doesn't get confused. Also, please read the “sticky” topics at the top of the Suggestions section - they have some guidance on suggestions that have already been rejected - and the reason why!

Finally, please do a search to see if there is already an existing topic for your suggestion - if there is, please use it rather than making another.

Thanks - and keep thinking of improvements

Powered by DjangoBB