Discuss Scratch

norahsimon07
Scratcher
15 posts

More Blocks

Hi! @norahsimon07 here!
I have an inquiry on the 'More Blocks' category.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You press More Blocks and then you get two choices. 'Make your own block' and 'add an extension'
Let's say you don't want to add an extension so you press Make your own block.
It then gives you a purple shaded block. below that it says:
'>options'
Then it says:
Add number input
add string input
add boolean input
add label text
without screen refresh.

WHAT DO YOU DO!!
Sinaboo
Scratcher
100+ posts

More Blocks

Are you asking how to use/make blocks? Do you know what blocks on scratch are?

Last edited by Sinaboo (Oct. 19, 2018 06:27:02)

norahsimon07
Scratcher
15 posts

More Blocks

Sinaboo wrote:

Are you asking how to use/make blocks? Do you know what blocks on scratch are?
I do know how to use blocks I just don't know how to function that specific type of block. Do you? How can you use that for making a game?
Sinaboo
Scratcher
100+ posts

More Blocks

norahsimon07 wrote:

Sinaboo wrote:

Are you asking how to use/make blocks? Do you know what blocks on scratch are?
I do know how to use blocks I just don't know how to function that specific type of block. Do you? How can you use that for making a game?
Which specific type of block? I don't really use blocks for any of my projects but I probably could if I wanted to. You can us them for making things easier/shorter.
Sinaboo
Scratcher
100+ posts

More Blocks

Oh the custom blocks. Do you have anything in mind you'd want to function into a custom block? Try thinking of something that involves numbers or variables.

Last edited by Sinaboo (Oct. 19, 2018 06:43:17)

awesome-llama
Scratcher
1000+ posts

More Blocks

For the input type, they are essentially variables that are updated when the custom stack block is run. String allows any text to be stored in the variable. Number is for numbers only, and boolean is either True or False.

// sets custom block variables and runs the hat block.
example (2) [text]::custom
define example (number variable) (text variable) <boolean>

Label text is to write the name in the block.

Run without screen refresh makes the block run in a single tick - there will be no delays in loops. This is very useful in projects that render pen frames as all the pen under the block is run instantly.

Edit: wow, ninja'd

Last edited by awesome-llama (Oct. 19, 2018 06:45:24)



Scratch-Minion
Scratcher
1000+ posts

More Blocks

More Blocks is used to make your own “custom block”.
When you have made a custom block, you can run all the code in it by putting its name in a script.


To draw a square you could write a script:

pen down
repeat (4)
move (100) steps
turn cw (90) degrees
end
pen up


You can make a block to draw a square.
Use “More Blocks”, type the name Square for your block then press <enter> and add the code.

define Square
pen down
repeat (4)
move (100) steps
turn cw (90) degrees
end
pen up

When you create a custom block such as Square, you will see a new Square block in the central purple tab.
Now when you want to draw a square in your code, you can just drag the block name into your project.


If you want your custom block to be able to draw squares of different sizes, add a number input under “options” and call it Size.
Instead of “move 100 steps” use “move Size steps” inside your custom block for Square.

Then there will be a space to enter an input when you call your custom block Square.
eg. You will be able to write Square 50 or Square 25
norahsimon07
Scratcher
15 posts

More Blocks

awesome-llama wrote:

For the input type, they are essentially variables that are updated when the custom stack block is run. String allows any text to be stored in the variable. Number is for numbers only, and boolean is either True or False.

// sets custom block variables and runs the hat block.
example (2) [text]::custom
define example (number variable) (text variable) <boolean>

Label text is to write the name in the block.

Run without screen refresh makes the block run in a single tick - there will be no delays in loops. This is very useful in projects that render pen frames as all the pen under the block is run instantly.

Edit: wow, ninja'd


Thank you but what doestext do?
Sinaboo
Scratcher
100+ posts

More Blocks

Nothing. It's just text.

Last edited by Sinaboo (Oct. 19, 2018 10:42:22)

norahsimon07
Scratcher
15 posts

More Blocks

Sinaboo wrote:

Nothing. It's just text.
Then how does it help in Scratch?
norahsimon07
Scratcher
15 posts

More Blocks

norahsimon07 wrote:

Sinaboo wrote:

Nothing. It's just text.
Then how does it help in Scratch?
NVM Thank you all for helping me I got it!
Sinaboo
Scratcher
100+ posts

More Blocks

norahsimon07 wrote:

Sinaboo wrote:

Nothing. It's just text.
Then how does it help in Scratch?
If you had multiple blocks then you could use the text to make it easier to understand which custom blocks are which. If you just had a bunch of inputs without text it might get confusing which custom block does what.
BladiPetrov
Scratcher
100+ posts

More Blocks

norahsimon07 wrote:

Sinaboo wrote:

Are you asking how to use/make blocks? Do you know what blocks on scratch are?
I do know how to use blocks I just don't know how to function that specific type of block. Do you? How can you use that for making a game?

Well, you can do this (very useful):

when gf clicked
forever
move x (<key [right arrow v] pressed?> - <key [left arrow v] pressed?
// If right is pressed that value will be 1

define move x (joystick x)
change [speed x v] by ((0.9) * (joystick x)
// Acceleration
set [speed x v] to ((0.9) * (speed x)) // Friction
change x by (speed x) // Move

Last edited by BladiPetrov (Feb. 13, 2022 17:46:25)


Scripts in forum helper and math and logic enjoyer
@greenFlag @delInput @addInput @turnLeft @turnRight @loopArrow :: #fdcfdc hat
About me

I have scratched for 7 years straight. No urge to do something to get popular. Friendly, I know Spanish (my native language) and English (and a bit of French). I like to program things I really like, not trends or things for contests.
EDIT: Yeah, I know it says I joined 4 years ago, but I scratched before going online.
SussyBaka2022
Scratcher
100+ posts

More Blocks

You
Could
Create
A
Block
In
The
Forums

Last edited by SussyBaka2022 (Feb. 13, 2022 12:17:22)




Go to Numberblock 35!
(non nb projects :: #ffc0cf)(internet)(antivirus) :: motion
(ouo :: control)( ònó)(Numberblocks :: #123456)(kumquats :: operators)(saviors (family)(siggy caretaker)(world) :: operators)
Hello, I am a half Malaysian half Singaporean Muslim! I am also an NB fan!
deck26
Scratcher
1000+ posts

More Blocks

SussyBaka2022 wrote:

You
Could
Create
A
Block
In
The
Forums
Please don't spam or necropost.

Last edited by deck26 (Feb. 13, 2022 12:40:13)

Powered by DjangoBB