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

#1 2011-05-20 17:22:32

DemonRider
Scratcher
Registered: 2011-05-20
Posts: 4

How do I hide my sprite after background changed?

I made a shooting game.
It works, but at the end, when the time is up, the background changes to a "well done" notice, when the background changed the game stops. But the flying sprites stay on and
cover the words. Even though they stopped moving, they stay still covering the image.

At the last scrips part of the well done notice, I put it as.

'switch to background [trophy]'
<stop all>

The flying targets is just a loop making them randomly fly, and randomly reappear when shot after 0.1 - 2 seconds.
Chat can I add on to the targets and final background to make the targets hide?

Thanks, I will post my game after.

Offline

 

#2 2011-05-20 19:56:20

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: How do I hide my sprite after background changed?

make a variable called Game Over
right after a "Green Flag clicked" block, set Game Over to no
when time is up, set Game Over to yes

in the flying sprites, add a block that says if Game Over = Yes, Stop Script


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#3 2011-05-20 22:08:06

Bookworm200
New Scratcher
Registered: 2011-04-14
Posts: 5

Re: How do I hide my sprite after background changed?

could u just post the game now... i can make the modifications to it and don't want any credit

Offline

 

#4 2011-05-21 06:12:47

emboar30
Scratcher
Registered: 2011-05-03
Posts: 100+

Re: How do I hide my sprite after background changed?

DemonRider wrote:

I made a shooting game.
It works, but at the end, when the time is up, the background changes to a "well done" notice, when the background changed the game stops. But the flying sprites stay on and
cover the words. Even though they stopped moving, they stay still covering the image.

At the last scrips part of the well done notice, I put it as.

'switch to background [trophy]'
<stop all>

The flying targets is just a loop making them randomly fly, and randomly reappear when shot after 0.1 - 2 seconds.
Chat can I add on to the targets and final background to make the targets hide?

Thanks, I will post my game after.

when the timer ends, make it broadcast win. on the sprite, make a when i receive win block and attach a hide block to that.


http://scratch.mit.edu/static/icons/buddy/788987_med.png?t=2011-05-02+15%3A14%3A41
I is epiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiic!     See my stuff here!!!!!

Offline

 

#5 2011-05-21 07:59:41

DemonRider
Scratcher
Registered: 2011-05-20
Posts: 4

Re: How do I hide my sprite after background changed?

sorry, none of your suggestions work?
And no, I will not let anyone edit my games  sad

Offline

 

#6 2011-05-21 09:11:49

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: How do I hide my sprite after background changed?

emboar30's suggestion should work. Just make a script on the stage that broadcasts 'end' when the background switches to the right one, and have this script in the sprites.

Code:

When I receive 'end'
hide

http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#7 2011-05-22 05:00:55

xGluttony
Scratcher
Registered: 2011-05-03
Posts: 25

Re: How do I hide my sprite after background changed?

I know the solution just tell me how do you win it.


http://i55.tinypic.com/2mcx6x5_th.jpg

Offline

 

#8 2011-05-22 15:06:30

emboar30
Scratcher
Registered: 2011-05-03
Posts: 100+

Re: How do I hide my sprite after background changed?

Harakou wrote:

emboar30's suggestion should work. Just make a script on the stage that broadcasts 'end' when the background switches to the right one, and have this script in the sprites.

Code:

When I receive 'end'
hide

Cheers dude


http://scratch.mit.edu/static/icons/buddy/788987_med.png?t=2011-05-02+15%3A14%3A41
I is epiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiic!     See my stuff here!!!!!

Offline

 

Board footer