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

#1 2007-05-21 17:07:46

miss_Scratchy
Scratcher
Registered: 2007-05-20
Posts: 2

I have a question about the timer if anyone can help me!

can you somehow get it so that at one point the timer isn't there, but then it appears at the point when you want it to? Thanks!

Offline

 

#2 2007-05-21 17:55:07

Roberth
Scratcher
Registered: 2007-05-15
Posts: 46

Re: I have a question about the timer if anyone can help me!

I have a quick demo you can check out that performs this task in a round-about fashion:

http://scratch.mit.edu/projects/Roberth/5731

There are some limitations to this, as this isn't really "hiding" and "showing" the timer variable, but instead it is using a sprite that is in a layer ahead of the timer display in order to cover the timer until you want it to be seen.  This "cover" sprite ought to match the background (in this demo it is just a white rectangle) for each of the stage background images that you are using.  And make sure that other sprites are moved "ahead" of this cover sprite if they are going to cross into the same region where the timer is located at.

Offline

 

#3 2007-05-21 17:55:32

dougster
Scratcher
Registered: 2007-05-20
Posts: 3

Re: I have a question about the timer if anyone can help me!

Hi, this is an idea but do not know if it will work.  Could you move the object to a grid point off the screen then wait then move it to a point on the screen.  This will either help or hinder you.  All the best.

Offline

 

#4 2007-05-21 19:33:55

Roberth
Scratcher
Registered: 2007-05-15
Posts: 46

Re: I have a question about the timer if anyone can help me!

dougster wrote:

Hi, this is an idea but do not know if it will work.  Could you move the object to a grid point off the screen then wait then move it to a point on the screen.  This will either help or hinder you.  All the best.

Unfortunately, no this isn't going to quite work out the way that you want it to.  As an example, try this small script on a "new" Scratch project and then click on the default sprite, adding these blocks:

when Sprite1 clicked
  go to x:1000 y:1000

What you will see is that the sprite will move off to the corner of the screen, but a small portion of the sprite will still be visible.  There are some other things you can do to minimize this problem even more, but it isn't really worth the extra headaches.

Instead, I would strongly recommend that you use the "hide" block if you want to have a sprite off of the screen for a while.  This also keeps the sprites from interacting with each other in ways that may make your projects harder to work with as well just by making everything more complex than necessary.

Offline

 

Board footer