60 likes | 148 Vues
Learn how to make sprites interact and control them using keyboard commands in Scratch. Discover how to implement the FOREVER IF command and create interactive games with items to collect and hidden doors to open based on score. Enhance your coding skills with this engaging tutorial.
E N D
Lesson Objectives • To understand how to make sprites interact • To understand the FOREVER IF command • To understand how to control sprites using the keyboard
What do you think this script does? • On scratch we can make sprite interact using the FOREVER IF command. • IF it touches sprite 2, it goes to those co-ordinates
Extension • Make 3 keys or coins to collect • Create a door which will only open once the 3 items have been collected.
Extension • If you want to add items to collect, you will need a score to record it. • Make a new variable called Score.
Create items to collect • Once you have created your variable you can add a script like this to each item. • When the flag is clicked it will reset the score and make sure the key is sowing • When it touches the ball, it will add 1 to the score and disappear
Opening the door • When the green flag is clicked it will reset the game and show the door • If the score equals 3 (if all 3 keys have been collected) the door will hide.