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

#1 2009-01-02 23:24:49

Inkstand
Scratcher
Registered: 2008-12-16
Posts: 23

Jumping

Hi all. I'm making a simple game similar to the one that came with Scratch when I downloaded it called "Doodle" where you draw the paths your character takes. I love the idea, but I have come across a problem. It may sound simple (and it probably is) but I can't figure out how to get my character to jump  hmm  I am thinking I may need to use X and Y variables but I keep confusing myself... anyone have any ideas? Much Appreciated  smile


"To say of what is that it is not, or of what is not that it is, is false, while to sat of what is that it is, and of what is not that it is not, is true." - Aristotle
"I don't apologize. I'm sorry, but that's just the way I am."  - Homer Simpson

Offline

 

#2 2009-01-02 23:52:15

techy
Scratcher
Registered: 2008-12-17
Posts: 100+

Re: Jumping

Hope this helps.. feel free to change it  big_smile

<when[ space ]key pressed>
<repeat( 5 ) >
<change y by( 2 ) >
<end>
<repeat until><touching[ ground ] >
<change y by( -2 ) >
<end>

Last edited by techy (2009-01-02 23:52:58)


Guppy Inc. making projects famous!
http://web-geeks.com/techy.gifhttp://web-geeks.com/grid.gifhttp://web-geeks.com/challenge.gif

Offline

 

#3 2009-01-02 23:59:01

Inkstand
Scratcher
Registered: 2008-12-16
Posts: 23

Re: Jumping

I like it, thanks  smile


"To say of what is that it is not, or of what is not that it is, is false, while to sat of what is that it is, and of what is not that it is not, is true." - Aristotle
"I don't apologize. I'm sorry, but that's just the way I am."  - Homer Simpson

Offline

 

#4 2009-01-03 01:31:18

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Jumping

The way techy described was probably the simplest way. You can also make it jump more smoothly if you want. Try looking at some of archmage's projects, the jumping is really smooth.
But if you're a new user, just use the simple way.  wink


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

Board footer