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

#1 2008-12-31 21:38:55

toastermath
Scratcher
Registered: 2008-12-30
Posts: 24

new member- need help with sratch

Hello, I am a new member of mit's scratch community. I was making my first full game, when I ran into a problem. I was finishing up this game where you have a ball and you move it through some obstacles, and get it to the goal. Each time you hit the goal, you recieve a bigger costume. After you narrowly reach the goal with the third costume, I want a little text box to appear saying YOU WIN!!! Now there is my problem. I can't find out how to make the box apear saying YOU WIN!!! I have been able to make it disapear throughout the game, but when the game is beat, how will I make the text box apear, most of all, which sprite should I put the script on. The ball's, the goal's or the text box itself.

Thank you so much, your help is appreciated!

Offline

 

#2 2008-12-31 23:05:12

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: new member- need help with sratch

To make the sprite reappear, you could use the Hide block when the project starts and the Show block when it needs to reappear.  Where you put the script is really up to you; you could do it a couple of different ways.  I would probably put it on the You Win sprite.  Just set up a "Wait Until" that checks to see what costume number the ball is using the sensing block with the two drop-down menus.  Let me know if you want a demo!


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2008-12-31 23:11:05

toastermath
Scratcher
Registered: 2008-12-30
Posts: 24

Re: new member- need help with sratch

Thank you so much!

Offline

 

#4 2009-01-01 23:01:54

toastermath
Scratcher
Registered: 2008-12-30
Posts: 24

Re: new member- need help with sratch

I just finished the game! I did a slight variation though... I made the ball a fourth costume that blends into the background and made the thing wait for the fourth costume to show the you win.
<wait until><( costume # of ball <=> 4 )>
<show>

Offline

 

#5 2009-01-02 00:14:58

toastermath
Scratcher
Registered: 2008-12-30
Posts: 24

Re: new member- need help with sratch

again, thank you. Herre is the link to the finished project!
http://scratch.mit.edu/projects/toastermath/368825

Offline

 

#6 2009-01-02 19:14:52

726961
Scratcher
Registered: 2008-11-26
Posts: 100+

Re: new member- need help with sratch

I played it and it is awesome


http://scratch.mit.edu/projects/726961/604658 play it now! or else...

Offline

 

#7 2009-01-03 12:34:59

pokemon_master12
Scratcher
Registered: 2008-09-26
Posts: 100+

Re: new member- need help with sratch

If you want the text box to appear only at the END of the game, you need to add this script to the text box:

[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<if>[/blocks][blocks]<( [blocks]<{ Sprite's Costume }>[/blocks] <=> 4 )>[/blocks]
[blocks]<show>[/blocks]
[blocks]<else>[/blocks]
[blocks]<hide>[/blocks]
[blocks]<end>[/blocks]

Make sure you make a variable that increases to the number of the sprite's costume every time it's costume changes or the script won't work.
Happy Scratch-ing!  wink


My Dragon Egg! http://dragcave.net/image/5YUA.gif
Visit my blog: http://freyasworld.wordpress.com/

Offline

 

#8 2009-01-03 16:43:23

toastermath
Scratcher
Registered: 2008-12-30
Posts: 24

Re: new member- need help with sratch

thanks pokemon_master12

Offline

 

Board footer