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

#1 2013-01-17 01:32:30

Gagamonster105
Scratcher
Registered: 2012-11-29
Posts: 100+

Hiding a sprite then showing it again

I have a bit in my game where the main sprite has to hide on level 3 but comeback on level 4. I know how to show it but the main sprite isn't moving. Is there a way of getting it moving without copying the motion script I made.

Thanks


http://i46.tinypic.com/14bklrq.png <click

Offline

 

#2 2013-01-17 06:56:10

numberonegamers
Scratcher
Registered: 2012-07-12
Posts: 100+

Re: Hiding a sprite then showing it again

When gf clicked
Forever
 If <<(level) < [3]> or <(level) > [3]>>
  Show
 Else
  Hide
End
hope that helps

Last edited by numberonegamers (2013-01-17 06:56:55)

Offline

 

#3 2013-01-17 09:05:29

BLU_Spy
Scratcher
Registered: 2012-01-05
Posts: 1000+

Re: Hiding a sprite then showing it again

And also this one:

when gf clicked
show
wait (0.1) secs
wait until <(level) = [3]>
hide
wait until <(level) > [3]>
show


I HAVE SWITCHED ACCOUNTS! My new username is NoxSpooth.

Offline

 

#4 2013-01-17 09:19:48

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: Hiding a sprite then showing it again

Hi,

That ought to do it.

when  clicked
show
wait 0.1 secs
wait until level = 3
hide
wait until level > 3
show

I also had a project were sprites needed to disappear at certain levels,
I used broadcasting like this:


when I receive (lvl_3_start v)
wait (1) seconds
go to x(0) y(0
show
wait (3) secs
hide

Hope all these posts give you plenty of options.  smile

Regards,

CAA14

Offline

 

#5 2013-01-17 09:25:26

CAA14
Scratcher
Registered: 2013-01-14
Posts: 1000+

Re: Hiding a sprite then showing it again

Edit:

The red "go to" block is suppose to be:

go to x(0) y(0)
I hope it's right this time.... wink

Offline

 

#6 2013-01-17 13:09:29

Gagamonster105
Scratcher
Registered: 2012-11-29
Posts: 100+

Re: Hiding a sprite then showing it again

BLU_Spy wrote:

And also this one:

when gf clicked
show
wait (0.1) secs
wait until <(level) = [3]>
hide
wait until <(level) > [3]>
show

Thanks, I tried all of them and this one was the best.

Thanks


http://i46.tinypic.com/14bklrq.png <click

Offline

 

#7 2013-01-17 16:04:12

BLU_Spy
Scratcher
Registered: 2012-01-05
Posts: 1000+

Re: Hiding a sprite then showing it again

Gagamonster105 wrote:

BLU_Spy wrote:

And also this one:

when gf clicked
show
wait (0.1) secs
wait until <(level) = [3]>
hide
wait until <(level) > [3]>
show

Thanks, I tried all of them and this one was the best.

Thanks

You're welcome!  big_smile


I HAVE SWITCHED ACCOUNTS! My new username is NoxSpooth.

Offline

 

Board footer