Scratch blocks - Make a Variable
In this video we are going to learn how to use "Make a Variable" Scratch block.
This block is one of the Variables blocks, and we are going to use it to make a variable, like it's title says.
But what is variable and why do we need it?
Variables are very very important components in Scratch and programming in general.
Think of them as boxes, jars, drawers in real life.
They start empty, you name them and then put some things in them.
Like fruits or vegetables in jars, socks or t shirts in drawers, new or old items in boxes.
But their power comes from their options to remember their value and change their content, hence the name variables.
So, if you have 10 t shirts in box, take 4, you will be left with 6 in it, right?
Simple as that, take something from variable, add more, and so on, repeat if needed, or don't if you don't have need for it.
But your game will probably need some kind of component to remember score, lives, health, ammo, player class and level, etc.
That's where variables come in handy, just instead of socks and t shirts we will be counting ammo, gold, goblins and enemies !
Keep on learning, keep on Scratching !!!
Other Videos By Knowledge For All
2019-12-12 | Scratch blocks - mouse x |
2019-12-11 | Scratch blocks - change variable ... by ... |
2019-12-10 | Scratch blocks - set variable ... to ... |
2019-12-10 | Scratch blocks - show variable ... |
2019-12-10 | Scratch blocks - hide variable ... |
2019-12-10 | Scratch blocks - round ... |
2019-12-04 | Scratch blocks - reset timer |
2019-12-04 | Scratch blocks - when loudness/timer greater then ... |
2019-12-04 | Scratch blocks - timer |
2019-12-04 | Scratch blocks - my variable |
2019-12-04 | Scratch blocks - Make a Variable |
2019-11-30 | Scratch blocks - backdrop number/name |
2019-11-25 | Scratch blocks - switch costume to ... |
2019-11-25 | Scratch blocks - when I receive message |
2019-11-25 | Scratch blocks - broadcast message |
2019-11-19 | Scratch blocks - join ... ... |
2019-11-19 | Scratch blocks - letter ... of ... |
2019-11-19 | Scratch blocks - length of ... |
2019-11-19 | Scratch blocks - answer |
2019-11-19 | Scratch blocks - ask ... and wait |
2019-11-18 | Scratch blocks - stop ... |