Scratch blocks - wait until ...

Subscribers:
499
Published on ● Video Link: https://www.youtube.com/watch?v=lmYAArFaj2k



Category:
Tutorial
Duration: 22:47
864 views
5


In this video we are going to learn how to use "wait until ..." Scratch block.
This block is one of the Control blocks, and we are going to use it to trigger butterfly movement based on cats movement.
Or to be more precise we will use it to make butterfly fly when the cat gets near to him.
In previous lesson we have learned how to calculate distance between two sprites (cat and butterfly), and now we will build upon that knowledge.
We will combine the "wait until" and "distance to" Scratch blocks and make some kind of distance trigger.
But you don't have to combine it with "distance to" block only !
This block is used for any situation where you want to trigger some action after some condition is fulfilled, hence the name "wait until".
Like for example:
- wait until player reaches 100 experience points - then level up him into level 2
- wait until player reaches level 10 - then give him some very hard quest
- wait until player dies - then pop up message "Play again !"
...
It probably reminds you of "If ..." block, and that's ok, they are very similar, and sometimes you will use one, sometimes another.
One of the advantages of "wait until ..." block, is that you don't have to put it into "forever" block.
But feel free to pick what you want, what you need, and what makes most sense to you.
If the code and game are working, players won't care, or know !

Keep on learning, keep on Scratching !!!







Tags:
Wait until ...
Scratch blocks
Scratch 3 blocks
Scratch
Scratch 3
Scratch tutorials
Scratch 3 tutorials
programming
coding
programming for kids
coding for kids
programming for beginners
coding for beginners
how to program
how to code
how to program in Scratch
how to code in Scratch
Knowledge For All
K4A