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.
Offline
thanks
Offline
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
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.
Offline
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
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
adding to what kevin said, say go to (place where variable is) and <go to front>
Offline
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
well, you can make a sprite health bar. uhhhhh. not so well. but yeah. works?
Offline
How do you make a sprite return to its starting position after gliding somewhere
Offline
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
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
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
5 )y
5)>
<glide( 1 )secs to x:(10 )y:(10)
Last edited by Heybrian (2008-01-19 14:04:38)
Offline
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
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>
Offline
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
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
switch to costume <costume#> - 1
Offline
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
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
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
Last edited by SirSniipesAlot (2008-01-20 13:34:07)
Offline
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)>
Offline
kevin_karplus wrote:
switch to costume <costume#> - 1
Now with blocks.
<repeat until><(costume #) <=>(1)>
<switch to costume[ ((costume #) <->(1))>
<end>
Offline