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

#1 2009-10-05 00:45:00

masterhand7
Scratcher
Registered: 2009-10-05
Posts: 100+

How to get a certain sprite to show and hide at specific times????!!!!

Im working on a project for school, and in my movie, a sprite is supposed to appear only once and for a few seconds. Im thinking that maybe the [blocks]<show>[/blocks] and [blocks]<hide>[/blocks] blocks can help me with this, but i don't know how to program these blocks so that the sprite can appear and disappear at specific points in a movie.  hmm  And no, I can't make it so that my sprite will hide when it touches another sprite, because the sprites are supposed to be separate from each other when the sprite appears. Can anyone provide me with a solution to this problem?


Click here to see the first iPhone virus!
http://www.danasoft.com/sig/MASTERHAND7PWNZ.jpg

Offline

 

#2 2009-10-05 00:54:39

masterhand7
Scratcher
Registered: 2009-10-05
Posts: 100+

Re: How to get a certain sprite to show and hide at specific times????!!!!

Anyone????


Click here to see the first iPhone virus!
http://www.danasoft.com/sig/MASTERHAND7PWNZ.jpg

Offline

 

#3 2009-10-05 00:57:34

masterhand7
Scratcher
Registered: 2009-10-05
Posts: 100+

Re: How to get a certain sprite to show and hide at specific times????!!!!

Hello...Anybody there?!?! I don't want to have to summon Crazy HAnd.


Click here to see the first iPhone virus!
http://www.danasoft.com/sig/MASTERHAND7PWNZ.jpg

Offline

 

#4 2009-10-05 01:15:19

martianshark
Scratcher
Registered: 2008-03-24
Posts: 1000+

Re: How to get a certain sprite to show and hide at specific times????!!!!

Well, you could tell it to wait, and then appear at a certain time.


http://img.geocaching.com/stats/img.aspx?txt=martianshark&amp;uid=e6cdc2c8-2476-4abd-9994-27f857396579&amp;bg=1

Offline

 

#5 2009-10-05 01:17:10

martianshark
Scratcher
Registered: 2008-03-24
Posts: 1000+

Re: How to get a certain sprite to show and hide at specific times????!!!!

Like this:
<when green flag clicked>
<wait( the wanted amount of time before it appears  )secs>
<show>

[do whatever the sprite is supposed to do now]

<hide>

Last edited by martianshark (2009-10-05 01:17:34)


http://img.geocaching.com/stats/img.aspx?txt=martianshark&amp;uid=e6cdc2c8-2476-4abd-9994-27f857396579&amp;bg=1

Offline

 

#6 2009-10-05 01:22:20

martianshark
Scratcher
Registered: 2008-03-24
Posts: 1000+

Re: How to get a certain sprite to show and hide at specific times????!!!!

Or, another sprite could tell it when to appear.

sprite 1's script:

<when green flag clicked>

[do whatever]

<broadcast[ make the sprite2 appear

sprite 2's script:

<when I receive[ make the sprite2 appear
<show>

[do whatever]

<hide>


http://img.geocaching.com/stats/img.aspx?txt=martianshark&amp;uid=e6cdc2c8-2476-4abd-9994-27f857396579&amp;bg=1

Offline

 

#7 2009-10-05 10:49:30

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: How to get a certain sprite to show and hide at specific times????!!!!

Yes that's right. That will work. At a specific time in a script if you want it to hide, just put the hide block. Same goes for the show.


Hai.

Offline

 

#8 2009-10-05 14:35:53

masterhand7
Scratcher
Registered: 2009-10-05
Posts: 100+

Re: How to get a certain sprite to show and hide at specific times????!!!!

Thanx martian shark


Click here to see the first iPhone virus!
http://www.danasoft.com/sig/MASTERHAND7PWNZ.jpg

Offline

 

#9 2009-10-05 19:41:34

martianshark
Scratcher
Registered: 2008-03-24
Posts: 1000+

Re: How to get a certain sprite to show and hide at specific times????!!!!

Your welcome.  big_smile


http://img.geocaching.com/stats/img.aspx?txt=martianshark&amp;uid=e6cdc2c8-2476-4abd-9994-27f857396579&amp;bg=1

Offline

 

Board footer