🐱 More Scratch content in my home tab https://jaredoleary.com/scratch
🎧 Computer science education podcast https://jaredoleary.com/csk8
🖥️ PC specs and gear I use https://jaredoleary.com/gear
🎮 Gaming playlists http://jaredoleary.com/game
🥁 Drumming playlists http://jaredoleary.com/drum
📅 Stream schedule https://jaredoleary.com/schedule
👕 Merch https://jaredoleary.com/merch
👪 Socials (in the menu) https://jaredoleary.com
🐱 Scratch project https://scratch.mit.edu/projects/8702...
━━━━━━━━━━━━━
Learn how to create a countdown timer in Scratch!
First, open the Variables tab and create a new variable named "timer." Choose whether it's for one sprite or all sprites, then click OK. This will create a new timer variable in the Variables tab.
Select an event block to start the timer, then attach a "set variable" block to set the timer variable to 5 (for a five-second timer). Add a "repeat until" block inside this block, with a "less than" operator comparing the timer variable to one.
Inside the "repeat until" block, add a "wait one second" block and change the timer variable by -1. This will make the timer count down until it reaches zero.
You can add code at the end to stop all other code or broadcast a message like "game over" when the timer reaches zero.
Check out the links above for more free Scratch videos, projects, lessons, tips, etc. If you'd like to learn how to teach computer science education with your students, check out the #CSK8 Podcast in the link above to explore research, experiences, and perspectives on computer science education through interviews with computer science educators, scholars, and administrators, as well as episodes that summarize and unpack implications of research for classroom teachers who are interested in learning more about practical applications of research in their classroom.
#scratch #JaredOLeary
━━━━━━━━━━━━━
00:00 Make a variable
00:13 Initialize your variable with the "set" block
00:26 Repeat until the Timer is less than 1
00:37 Why not Repeat until Timer = 0?
00:52 Code the timer
01:00 Testing the timer
01:06 What to do when the timer stops
01:11 How to find the code for this project (and even more Scratch tips)