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

#1 2013-05-01 09:20:50

iomartin
New Scratcher
Registered: 2013-05-01
Posts: 1

Sprint hidden at startup

Hello,

I have a couple sprints that I wouldn't like to be shown until a certain point in my program. How can I hide them until them?

Hiding them when the green arrow doesn't do it, because they will show until the user clicks on the green arrow.

Thanks

Offline

 

#2 2013-05-01 17:54:24

LucarioMage
New Scratcher
Registered: 2013-04-05
Posts: 4

Re: Sprint hidden at startup

I think this will work, if you are making an animation.  Otherwise you might have to change some of the things.

In the script that has user input to start the program place a block that sets timer to 0.
directly below that, place a block for Broadcast (something you can remember).
on all sprites that need to be hidden, have a script like,

When I receive |whateverItWasYouChose|
Hide
End this script

Then, in the script that user starts

|Forever
|If <timer=*>
|Broadcast |SomethingElse|
|||||||||||||||||||||||||>>^

And the sprite will receive it when the time is that.  In the receive, just put a show block.

I hope this helps.  If it is a game you will need something other than a timer.

Offline

 

#3 2013-05-01 21:02:30

dracae
New Scratcher
Registered: 2013-04-05
Posts: 42

Re: Sprint hidden at startup

Well, if you want the sprite to appear after, say, 10 seconds, do:

when gf clicked
hide
wait (10) secs
show
For a broadcast, do:
when I receive [1 v]
show

Offline

 

Board footer