100 Top Tips: Microsoft Excel
Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.
One way to add an element of challenge to even the simplest of games is to add a time limit. A countdown on-screen and a rising sound effect can help to heighten the tension. My 10-block demo below does all of this for you. You can add it to any game to add a 30 second time limit, and can adjust the time limit to any number you want.
You can put this script on any sprite or on the background. If your sprite already has other scripts on it, add the timer script as an additional script on the sprite. Don't try to combine them, otherwise you're likely to slow your game down because of the 1 second wait in the loop here.
You can see my Scratch timer demo below. I added a moving cat, just so you can confirm that the script stops when the timer reaches zero.
© Sean McManus. All rights reserved.
Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!
This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.
Code a space adventure game in this Python programming book published by No Starch Press.
Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!
Learn to make games and other programs in Scratch, and make a web page in HTML. Highly interactive book for 7-10 year olds.
What happens beyond AI when the machines become emotional? Discover my new album of electronic music here.