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

#1 2011-05-17 15:23:28

garawrules
New Scratcher
Registered: 2011-05-16
Posts: 7

Chrono problem!

Hi, it's me again... My project consists in an abc game where you have to press the letter that is shown on the screen. I want to establish a puntuation at the end of the game that is based on the time the player has taken to finish it.

My problem is:

I have an introduction at the beginning of the game, which explain how it works and all that stuff. I want the chrono to start when the presentation has finished and keep it hide until the moment arrives. How can I do to show the chrono when the game starts and avoid to start it when the green flag is pressed and the game is started??

Thanks

Offline

 

#2 2011-05-17 15:28:48

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Chrono problem!

I may not have understood that properly, so you want a timer to start when the game begins, but keep it hidden, and when the game ends you want it to stop and show?

I suppose you could do something like this:
http://i56.tinypic.com/107rh39.gif
When the game ends set the variable "Game" to 0.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#3 2011-05-17 15:42:08

garawrules
New Scratcher
Registered: 2011-05-16
Posts: 7

Re: Chrono problem!

I want the time to hide when the introduction begins but when the game starts i want it to show and start to count from 0.

I use the chronometre square located at sensors...

I have succeeded in set chrono to 0 when the game starts, now I only need to know how show it and hide it...

Thanks

Offline

 

#4 2011-05-17 15:46:35

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Chrono problem!

Oh ok, the chronometre doesn't have a show and hide function (I hope they change that soon).  But you can make a variable and constantly set that variable to the value of the chronometre:
http://i56.tinypic.com/29imox.gif
Variables have show and hide functions, so you can show and hide that variable.

Last edited by Kileymeister (2011-05-17 15:46:50)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#5 2011-05-17 15:52:42

garawrules
New Scratcher
Registered: 2011-05-16
Posts: 7

Re: Chrono problem!

I've tried it, if you arrange all like that, the chrono keeps showing at the beginning and when i say show variable chrono the orange chrono appears, but the blue one keeps there from the beginning....

If you want give me your e-mail and i'll send you my project to check how it works because i can't upload it by now, remember?

Thanks

Offline

 

#6 2011-05-17 16:06:26

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Chrono problem!

Well just click the checkmark by the blue chrono and it will disappear, so you'd only have the orange chrono showing and disappearing.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#7 2011-05-17 16:13:56

garawrules
New Scratcher
Registered: 2011-05-16
Posts: 7

Re: Chrono problem!

It works!! Thanks!  big_smile

Offline

 

Board footer