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

#1 2008-07-18 02:06:02

Herblist2
Scratcher
Registered: 2008-07-18
Posts: 1

how can i make my sprite jump

plz help me i dont know how to make my sprite jump becuase i put a variable jump and from their i dont know what to do?

Offline

 

#2 2008-07-18 03:49:26

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: how can i make my sprite jump

Welcome to Scratch, Herblist2!

you might want to check these forum-threads:
http://scratch.mit.edu/forums/viewtopic.php?pid=47089#p47089
http://scratch.mit.edu/forums/viewtopic.php?pid=46887#p46887
http://scratch.mit.edu/forums/viewtopic.php?pid=46200#p46200

they also point to some example projects and should give you some ideas how to get started...


Jens Mönig

Offline

 

#3 2008-07-18 10:43:03

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: how can i make my sprite jump

This is quite simple:

Simply put the following command on the sprite you wish to jump:

<when[ Space ]key pressed>
<change y by(5)>
<wait( 1 )secsc>
<change y by(-5)>

If you want to make it smoother, then do this:

<when[ Space ]key pressed>
<repeat(5)
<change y by(1)>
<wait( 0.2 )secsc>
<change y by(-1)>

It gives the same result, but looks better  wink


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

Board footer