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

#1 2010-07-08 08:01:58

hollie1
New Scratcher
Registered: 2010-07-08
Posts: 1

adding a timer and moving through levels on a game

could someone let me know how to add a timer to a game and stop when reaches certain time.

Also i have created 3 levels to my game hope do i move from level 1 to 2 ect?

Offline

 

#2 2010-07-08 08:13:37

helltank
Scratcher
Registered: 2010-05-21
Posts: 1000+

Re: adding a timer and moving through levels on a game

This should be on all about scratch... but to answer your question,try

Set Variable Timer to 100
Forever If Playing A level? =1
change Variable Timer by -1
wait 0.1 seconds


As for the level changing?

When variable level=3
Change costume to level 3


Error:Signature could not load. Please wait for an indefinite amount of time, until you realize you're gullible and go off to look for another potentially interesting signature to stare at.

Offline

 

#3 2010-07-08 10:11:36

Telemachus
Scratcher
Registered: 2010-04-21
Posts: 500+

Re: adding a timer and moving through levels on a game

I prefer to use broadcasts to change levels, but variables will also do the trick  smile
Example: When I receive "New Level"
                      next costume, etc.

Last edited by Telemachus (2010-07-08 10:12:38)


http://i54.tinypic.com/10h0fnp.jpg

Offline

 

#4 2010-07-09 01:42:09

Chrischb
Scratcher
Registered: 2008-07-24
Posts: 1000+

Re: adding a timer and moving through levels on a game

hollie1 wrote:

could someone let me know how to add a timer to a game and stop when reaches certain time.

Try something like this:
http://img805.imageshack.us/img805/869/exporter.png
The reason the script uses the number 49.9 and the > sign is because the timer counts quickly and in tenths; if the script used the number 50 and the = sign it wouldn't sense it.

hollie1 wrote:

Also i have created 3 levels to my game hope do i move from level 1 to 2 ect?

There are lots of ways to advance in a levels... here's an example, supposing that to advance a sprite had to touch a certain color:
http://img96.imageshack.us/img96/869/exporter.png


I fall: It's a tragedy. You fall: It's comedy.
Hmph enjoy your fall - I get a lovely spring... without pans of new leaves.

Offline

 

Board footer