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

#51 2008-01-16 17:45:46

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Ask me anything, for i am a Pro Scratcher

Heybrian wrote:

<when green flag clicked>
    <repeat until>
    <next costume>
    <wait(5)secs>
    <end>


  And you have costumes the pictures you want with the slide show in order, and youl see it.

or how many seconds you want to wait before the next picture shows up.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#52 2008-01-16 18:07:35

Weed_World
Scratcher
Registered: 2008-01-15
Posts: 3

Re: Ask me anything, for i am a Pro Scratcher

thanks

Offline

 

#53 2008-01-16 19:17:30

randomdude
Scratcher
Registered: 2007-12-15
Posts: 28

Re: Ask me anything, for i am a Pro Scratcher

I was just wondering, how would you hide a variable that is showing, but then show it later. For example, if you wanted to hide the health bars, until you click a button, then the health bars show.

Offline

 

#54 2008-01-16 19:49:46

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Ask me anything, for i am a Pro Scratcher

randomdude wrote:

I was just wondering, how would you hide a variable that is showing, but then show it later. For example, if you wanted to hide the health bars, until you click a button, then the health bars show.

That, is currently impossible in scratch. maybe you could ask for it in the next downloadable scratch.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#55 2008-01-16 20:16:20

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Ask me anything, for i am a Pro Scratcher

To hide variables, you put a sprite in front of them that looks like the background.  To show variables, you hide that masking sprite.

Offline

 

#56 2008-01-16 20:59:45

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: Ask me anything, for i am a Pro Scratcher

Hiding/showing the on-screen variable displays (or altering them with scripts) has been requested often.  Currently, covering them as Kevin suggested is the best you can do.

If you are interested in Health "Bars", you will need to make those on your own.  It has been done by using the "pen" to paint a wide line, which you can remove with "Clear" from the Pen menu.  (Search the forums to find some examples).

Here is a demo of another possible way:

http://scratch.mit.edu/projects/EdnaC/81880

This is a "piece" of a project that I'm currently working on that stamps the health bars onto the screen.  To erase, this demo stamps again using the background color to avoid using "clear" (clear erases all stamps, and my project has some that I want to keep).  This may give you some ideas on possible ways to do what you want.

-MrEd

Offline

 

#57 2008-01-16 21:26:11

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Ask me anything, for i am a Pro Scratcher

adding to what kevin said, say go to (place where variable is) and <go to front>


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#58 2008-01-17 18:48:50

randomdude
Scratcher
Registered: 2007-12-15
Posts: 28

Re: Ask me anything, for i am a Pro Scratcher

Thanks for your advice. I already made the health bars but I had a menu in teh beginning, so I wanted the health bars to show only when necessary. Thanks.

Offline

 

#59 2008-01-17 23:11:12

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Ask me anything, for i am a Pro Scratcher

well, you can make a sprite health bar. uhhhhh. not so well. but yeah. works?


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#60 2008-01-18 23:38:25

SirSniipesAlot
Scratcher
Registered: 2008-01-18
Posts: 10

Re: Ask me anything, for i am a Pro Scratcher

How do you make a sprite return to its starting position after gliding somewhere

Offline

 

#61 2008-01-19 13:26:41

lonkerd
Scratcher
Registered: 2008-01-19
Posts: 5

Re: Ask me anything, for i am a Pro Scratcher

How do I make a, lets say a bow and arrow, arrow come out of the bow and then make my guy move, but still be able to shot a arrow no mate were I am on the screen and see it on the screen

tell me if you need more detail

Offline

 

#62 2008-01-19 13:27:47

lonkerd
Scratcher
Registered: 2008-01-19
Posts: 5

Re: Ask me anything, for i am a Pro Scratcher

How do I make a, lets say a bow and arrow, arrow come out of the bow and then make my guy move, but still be able to shot a arrow no mate were I am on the screen and see it on the screen

tell me if you need more detail

Offline

 

#63 2008-01-19 13:28:51

lonkerd
Scratcher
Registered: 2008-01-19
Posts: 5

Re: Ask me anything, for i am a Pro Scratcher

wops sorry about that to many lol

Offline

 

#64 2008-01-19 14:03:25

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Ask me anything, for i am a Pro Scratcher

sirsnipes: in the corner ul see X and Y and wherever you move  your mouse it will change.
memorize the cordinates of the y and x and say <when green flag clicked>
                                                                         <go to x:(10)y:(10)>

    while on anothre script, <when green flag clicked>
                                       <glide(1  )secs to x sad  5 )y sad  5)>
                                       <glide( 1 )secs to x:(10  )y:(10)

Last edited by Heybrian (2008-01-19 14:04:38)


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#65 2008-01-19 14:06:36

SirSniipesAlot
Scratcher
Registered: 2008-01-18
Posts: 10

Re: Ask me anything, for i am a Pro Scratcher

Alright ty.  Now, I've gotten it all worked out except for one problem:  The falling bombs in my game are supposed to explode(change to cotume 2), then stop the game.  For some reason this only works ifthe guy is moving for some reason.  I want it to explode and stop the game even if he's sitting still.  Any help?

Offline

 

#66 2008-01-19 14:12:20

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Ask me anything, for i am a Pro Scratcher

lonkerd wrote:

How do I make a, lets say a bow and arrow, arrow come out of the bow and then make my guy move, but still be able to shot a arrow no mate were I am on the screen and see it on the screen

tell me if you need more detail

to be shot? or to shoot? to be shot, this way makes it so you might die.

                Bow and arrow guy: <when[space]key pressed>
                                              <broadcast[ shoot ]>

               Arrow:    <when I receive[ shoot ]>
                            <point towards(human)>
                            <move(30)steps>
                            <forever if>  <touching[ human ]>
                             <broadcast[ DIE! ]>
                              <end>

                 Human: you can do the moving part. If you dont, look at my project "knight" and download.   <when I receive[ DIE! ]>
                       <switch to costume[ dead ]>
                       <stop all>


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#67 2008-01-19 14:17:12

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Ask me anything, for i am a Pro Scratcher

You can use a "go to" block or a "glide to" block to go where you want.  If you need to remember a location to go back to it, you can use 2 variables and set them to the x position and y position.  Then you can go to the place you remembered at any time later in the script.

Offline

 

#68 2008-01-19 17:59:16

lonkerd
Scratcher
Registered: 2008-01-19
Posts: 5

Re: Ask me anything, for i am a Pro Scratcher

thank you so much for the help, i found out a lot when you showed me that, thank you, but i have one more thing to ask, sorry, but how do you keep it on the guy why he is moving around, like how do you keep the arrow on the "Bow and arrow guy" tell you shoot it, i know how to shoot it and all, but how do you keep it with him tell then, plz help

thank you so much,

From a NOOB

Offline

 

#69 2008-01-19 18:07:16

Jman720
Scratcher
Registered: 2007-11-27
Posts: 1000+

Re: Ask me anything, for i am a Pro Scratcher

Is there a way to make costumes go back, there is a next costume block, but is there a wa to do te opposite, like go back a costume or something.


Solve for x
2+3+2+(-9)+1x+2x=7

Offline

 

#70 2008-01-19 18:09:06

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: Ask me anything, for i am a Pro Scratcher

switch to costume <costume#> - 1

Offline

 

#71 2008-01-20 00:28:26

SirSniipesAlot
Scratcher
Registered: 2008-01-18
Posts: 10

Re: Ask me anything, for i am a Pro Scratcher

Alright I've got my scuba guy shooting bullets (the bullet is a different sprite) shooting from the gun of the scuba.  My problem is that when it hits the fish its supposed to die and float to the top, but when the bullet hits the fish it won't die. Help!?!?!?

Offline

 

#72 2008-01-20 12:17:59

randomdude
Scratcher
Registered: 2007-12-15
Posts: 28

Re: Ask me anything, for i am a Pro Scratcher

I have got two question. With my posts of the masking the variables and the advice you gave me, its working great. Yet, when I post th project on the website, the "masker" is not "masking". Instead, its position has changed (it went lower). Also, I was adding music into my game. How would make it that when m is pressed, it would play music and then if n was pressed, it would play music but stop the other music that is playing.

Last edited by randomdude (2008-01-20 12:19:35)

Offline

 

#73 2008-01-20 13:02:01

SirSniipesAlot
Scratcher
Registered: 2008-01-18
Posts: 10

Re: Ask me anything, for i am a Pro Scratcher

Alright I got my previous problem fixed, but the boss has given me another problem.  I want him to come to the right of the screen, say a line, then start firing and stuff.  My problem is that when he's saying the lines, the player can be hurt.  Same thing with after he's been killed, he's supposed to say a line then move off screen.  Is there any way to make him like invincible for a certain period of time?

EDIT:  Nevermind, for some reason my project deleted itself  sad

Last edited by SirSniipesAlot (2008-01-20 13:34:07)

Offline

 

#74 2008-01-20 21:11:57

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Ask me anything, for i am a Pro Scratcher

lonkerd wrote:

thank you so much for the help, i found out a lot when you showed me that, thank you, but i have one more thing to ask, sorry, but how do you keep it on the guy why he is moving around, like how do you keep the arrow on the "Bow and arrow guy" tell you shoot it, i know how to shoot it and all, but how do you keep it with him tell then, plz help

thank you so much,

From a NOOB

okay. the arrow is a diferent sprite than the bow dude.
                                        Sprite arrow:<when green flag clicked>
                                                          <repeat until><key[space]pressed?>
                                                           <go to[ bow dude ]>
                   
                                           
                                    Bonus for not making him shoot again:

                                       bow dude script:
                                             <when[space]key pressed>
                                             <if> <<  <not>touching bow and arrow dude  >>
                                             <broadcast[dont shoot man]>
                                             <else>
                                               Do other script i told you
                                              <end>
                                     
                                Arrow script:
                                             <when I receive[ don't shoot man]>
                                             <set{anything}to(50)>

    The otehr script i told you:

                                <when I receive[ SHOOT]>
                                <if><( anything (variable) <=> (50 )>
                                <stop script>
                                 <else>
                                   do all that complicated stuff i told you.
                                 <end>

                         <when green flag clicked>
                         <set{anything}to(0)>


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#75 2008-01-20 21:16:10

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: Ask me anything, for i am a Pro Scratcher

kevin_karplus wrote:

switch to costume <costume#> - 1

Now with blocks.

                                    <repeat until><(costume #)  <=>(1)>
                                    <switch to costume[ ((costume #)  <->(1))>
                                     <end>


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

Board footer