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

#1 2010-09-04 00:38:52

GizmoGadget5
Scratcher
Registered: 2010-07-12
Posts: 2

jump script

how do you make a simple jump script with the variables?  hmm

Offline

 

#2 2010-09-04 00:42:50

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: jump script

You don't need to use variables for jump scripts - but if you want a jump with velocity, variables come in handy. Here's a simple jumping script with velocity that uses a variable:

http://img72.imageshack.us/img72/9899/194jumpingscriptwithafa.png

Any questions?


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2010-09-04 00:53:19

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: jump script

Jonathanpb wrote:

You don't need to use variables for jump scripts - but if you want a jump with velocity, variables come in handy. Here's a simple jumping script with velocity that uses a variable:

http://img72.imageshack.us/img72/9899/1 … ithafa.png

Any questions?

I prefer this:
http://i821.photobucket.com/albums/zz140/Sunrisemoon/BetterYvel.gif
It's a bit easier to edit/look at.

Edit: Whoa! The quality in the image is horrible! I wonder why  yikes .

Last edited by Sunrise-Moon (2010-09-04 00:53:50)


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

#4 2010-09-04 10:55:44

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: jump script

Here Here is my tutorial on another variation...


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#5 2010-09-08 22:38:16

16mlevatich
New Scratcher
Registered: 2010-09-08
Posts: 1

Re: jump script

I used the sets and they work a lot!  Thanks!! (I never knew how to make my dude jump) im trying to make a platformer!

Offline

 

#6 2010-10-29 14:17:31

dhruvsnh
Scratcher
Registered: 2010-07-31
Posts: 3

Re: jump script

this is how i do it but it doesn't work on platforms and the law of gravity

<when[ up ]key pressed>
<set{ jump }to( 10
<repeat(10<change y by(10
<repeat until><touching[platform
<change{ jump }by(-1 
<change y by(<{ jump }>

Offline

 

#7 2010-10-30 13:33:13

dhruvsnh
Scratcher
Registered: 2010-07-31
Posts: 3

Re: jump script

Actually this one I made with other people's scripts

<when green flag clicked>
<forever>
<change y by(<{ jump }>
<if><touching[ platform
<set{ jump }to(0 
<if> << <key[ space ]pressed?> <and> <touching[ platform  >>
<repeat( 7
<change{ jump }by(2
<else>
<change{ jump }by(-1

Offline

 

Board footer