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

#1 2010-07-01 15:56:31

explosivedude
Scratcher
Registered: 2010-06-22
Posts: 64

urgent help on jumping please help

i am making a game with lots of jumping and need a very good jumping script like the one on the game push. can you please help me.

Offline

 

#2 2010-07-01 16:06:05

murpho
Scratcher
Registered: 2010-07-01
Posts: 1000+

Re: urgent help on jumping please help

its pretty easy. i know the jump script but not the gravity script


https://lh6.googleusercontent.com/-l-rgCPiQ9pY/Tp32n1MRUEI/AAAAAAAADoA/HNQWbO8OOaA/s510/soccerleague.gif

Offline

 

#3 2010-07-01 16:08:52

explosivedude
Scratcher
Registered: 2010-06-22
Posts: 64

Re: urgent help on jumping please help

well i mostly get it its mainly gravity that i dont get. can u help me by putting blocks on here? but im a lil rusty on jumping

Offline

 

#4 2010-07-01 16:12:28

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: urgent help on jumping please help

Are you looking for a simple linear up/down motion, or do you want realistic jumping/gravity with acceleration?


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#5 2010-07-01 16:23:44

explosivedude
Scratcher
Registered: 2010-06-22
Posts: 64

Re: urgent help on jumping please help

realistic jumping/gravity with acceleration.

Offline

 

#6 2010-07-01 16:39:45

explosivedude
Scratcher
Registered: 2010-06-22
Posts: 64

Re: urgent help on jumping please help

bump

Offline

 

#7 2010-07-01 20:16:03

zxz1661
Scratcher
Registered: 2010-01-06
Posts: 52

Re: urgent help on jumping please help

You need a variable called <{ xvel }> with a block at the bottom that says: <if><touching color[ set <{ xvel }> to 0 <else> change xvel by -0.2

Then, at the bottom squeeze in a Change x by xvel.

For the jump, say If up arrow pressed, set xvel to any number you want.
(Put this inside the "If" for the "If Else" block.

Offline

 

#8 2010-07-01 22:03:54

explosivedude
Scratcher
Registered: 2010-06-22
Posts: 64

Re: urgent help on jumping please help

okay thanks i changed it a little buti have it working now

Offline

 

#9 2010-07-01 22:45:09

militarydudes
Scratcher
Registered: 2008-09-12
Posts: 1000+

Re: urgent help on jumping please help

I KNOW ONE! I made it  long time ago. Hold on while I dig it up....


__m. .m__ KILROY WAS HERE
        U

Offline

 

#10 2010-07-01 22:50:50

militarydudes
Scratcher
Registered: 2008-09-12
Posts: 1000+

Re: urgent help on jumping please help

Okay I can't post it here in words so I'll put it online and give you the link  big_smile

Last edited by militarydudes (2010-07-01 22:51:30)


__m. .m__ KILROY WAS HERE
        U

Offline

 

#11 2010-07-01 23:31:11

mariobrosrule
Scratcher
Registered: 2008-06-09
Posts: 1000+

Re: urgent help on jumping please help

try this but take out the

<if><key[ up ]pressed?>
<set{ G }to( 15
etc.
see the project here

Offline

 

#12 2010-07-02 11:04:37

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

Re: urgent help on jumping please help

A little advice... start small! In my opinion, the biggest problem in learning game programming has always been trying to write something too complicated, getting discouraged, and giving up. But definitely use these brainiacs around here for advice, why not?? What I taught myself to play on Guitar in 10 years I could have learned in 1 year if I'd had an instructor >=P and they co$t money lol.

Last edited by Locomule (2010-07-02 11:05:07)


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

Offline

 

#13 2010-07-02 19:17:20

militarydudes
Scratcher
Registered: 2008-09-12
Posts: 1000+

Re: urgent help on jumping please help

http://scratch.mit.edu/projects/Donkeys … ts/1166080 here you go  big_smile  its on my other account

Last edited by militarydudes (2010-07-02 19:17:43)


__m. .m__ KILROY WAS HERE
        U

Offline

 

Board footer