Scratch blocks - wait until ...
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 !!!
Other Videos By Knowledge For All
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 ... |
2019-11-18 | Scratch blocks - wait until ... |
2019-11-18 | Scratch blocks - distance to ... |
2019-11-08 | Scratch blocks - ... and ... |
2019-11-05 | Inkscape - download & installation |
2019-11-05 | Krita - download & installation |
2019-11-03 | K4A Patreon page created !!! |
2019-11-02 | Scratch blocks - backdrop number/name |
2019-10-28 | Scratch blocks - set y to ... |
2019-10-27 | Scratch blocks - y position |
2019-10-21 | Scratch blocks - next backdrop |
2019-10-21 | Scratch blocks equal less than greater than |