Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Hey! I'm new here and need a little help.... :/
- RosyThorn
- New to Scratch
8 posts
Hey! I'm new here and need a little help.... :/
I've got my sprite made and she's real cute. I've got it so she walks back and forth! Hooray! But i'm having trouble making it so she can jump. Would someone mind helping me with that?
Also, obstacles, how do you get it so obstacles actually block the sprites way? or like, ground, how do get it so she can't go lower than the ground?
Thank you bunches!
Also, obstacles, how do you get it so obstacles actually block the sprites way? or like, ground, how do get it so she can't go lower than the ground?
Thank you bunches!
- JamesEpicness
- Scratcher
7 posts
Hey! I'm new here and need a little help.... :/
To make her jump:
IF <key space pressed>
REPEAT 10
Change Y by 10
REPEAT 10
Change Y by -10
IF <key space pressed>
REPEAT 10
Change Y by 10
REPEAT 10
Change Y by -10
- drmcw
- Scratcher
1000+ posts
Hey! I'm new here and need a little help.... :/
For obstacles you need to add in some logic. So if you decided the ground was always flat then you could just add in an if y position < y position of ground then set y position to y position of ground. A more common way is to have the ground a certain colour and use if touching that colour then don't change y position else change y position by an amount that simulates gravity. This method means your sprite will fall so you'd have to modify JamesHollis jump routine. There are lots of platform type projects, try taking a look at some of them for ideas.
- RosyThorn
- New to Scratch
8 posts
Hey! I'm new here and need a little help.... :/
Wow, thanks! I am dyslexic and not to good at math. (I'm going to have to do it through the summerXC.) So my head started swimming with all the x & y & y & x's. What you guys have said has helped a lot! Now I think I can get my head around this stuff!
Is there a place with this kind of info that I can just look up, so I don't have to keep asking a bunch of questions that make me look dumb?
Thank you so much you guys!!
Is there a place with this kind of info that I can just look up, so I don't have to keep asking a bunch of questions that make me look dumb?
Thank you so much you guys!!
- Tezliov
- Scratcher
71 posts
Hey! I'm new here and need a little help.... :/
The Scratch Wiki has some useful information: Wow, thanks! I am dyslexic and not to good at math. (I'm going to have to do it through the summerXC.) So my head started swimming with all the x & y & y & x's. What you guys have said has helped a lot! Now I think I can get my head around this stuff!http://wiki.scratch.mit.edu/wiki/Main_Page
Is there a place with this kind of info that I can just look up, so I don't have to keep asking a bunch of questions that make me look dumb?
Thank you so much you guys!!
- RosyThorn
- New to Scratch
8 posts
Hey! I'm new here and need a little help.... :/
Alright people! I have run into another problem!! I have made a cloud that lightly floats to the right, through the sky. But I want it to teleport back to the left to start it's floating over again. I can't get it to do it!!!! :'( Help please!
THANK YOU, TEZLIOV!!! That is soo helpful!
You people have been so helpful!! Thank you!!
THANK YOU, TEZLIOV!!! That is soo helpful!
You people have been so helpful!! Thank you!!
Last edited by RosyThorn (June 9, 2013 02:26:22)
- RosyThorn
- New to Scratch
8 posts
Hey! I'm new here and need a little help.... :/
Dracae, I was so unbelievably close. Thank you!!
- RosyThorn
- New to Scratch
8 posts
Hey! I'm new here and need a little help.... :/
Dracae, how long did take you to make drop???
Drop is amazing. Did you do all that code by yourself or did do what I'm doing and copying everything?
Drop is amazing. Did you do all that code by yourself or did do what I'm doing and copying everything?
Last edited by RosyThorn (June 9, 2013 02:59:52)
- Mark50infinityking
- Scratcher
22 posts
Hey! I'm new here and need a little help.... :/
I've got my sprite made and she's real cute. I've got it so she walks back and forth! Hooray! But i'm having trouble making it so she can jump. Would someone mind helping me with that?
Also, obstacles, how do you get it so obstacles actually block the sprites way? or like, ground, how do get it so she can't go lower than the ground?
Thank you bunches!
when green flag clicked
broadcast [Jump v]
when I receive [Jump v]
wait (0) secs
repeat (7)
change y by (10)
(Put the block below me under the repeat loop)
broadcast [Jump down v]
end
when I receive [Jump down v]
wait (0) secs
repeat (7)
change y by (-10)
end
Last edited by Mark50infinityking (Oct. 17, 2021 12:46:56)
- deck26
- Scratcher
1000+ posts
Hey! I'm new here and need a little help.... :/
Why are you replying to a post from 2013?I've got my sprite made and she's real cute. I've got it so she walks back and forth! Hooray! But i'm having trouble making it so she can jump. Would someone mind helping me with that?
Also, obstacles, how do you get it so obstacles actually block the sprites way? or like, ground, how do get it so she can't go lower than the ground?
Thank you bunches!when green flag clicked
broadcast [Jump v]
when I receive [Jump v]
repeat (7)
change y by (10)
repeat (7)
change y by (-10)
end
end
- Mark50infinityking
- Scratcher
22 posts
Hey! I'm new here and need a little help.... :/
Wait… i just realized that LOL
- Discussion Forums
- » Help with Scripts
- » Hey! I'm new here and need a little help.... :/