This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-03-11 08:08:22

Louis2018
Scratcher
Registered: 2008-06-13
Posts: 1000+

How do you make a script for a screensaver?

How do you make a script for a screensaver so that it goes off if the mouse doesn't move for 30 seconds?


http://img707.imageshack.us/img707/4547/louis2018.gif

Offline

 

#2 2010-03-11 12:38:53

AddZero
Scratcher
Registered: 2007-08-11
Posts: 100+

Re: How do you make a script for a screensaver?

That's a fun challenge!
I don't want to spoil it for you.   smile

Tips for one way to do it:
Here's some blocks you'll need: timer, forever, mouseX, mouseY, if then, +, =, >.
Here's some variables you'll need: lastMouseX, lastMouseY, isScreenSaverRunning?, timerOfLastMouseMovement.

Try to piece those together in a way to trigger and stop a screen saver.  If you get stuck, I'll give more hints.

Last edited by AddZero (2010-03-11 12:44:04)


http://scratch.mit.edu/static/icons/buddy/524717_med.png?t=2010-06-15+09%3A48%3A36

Offline

 

Board footer