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

#1 2008-11-21 15:33:13

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

Double Jumping

I want to make a sprite jump, and then while it's in the air, jump again. Whats the best way of doing this, while using gravity.

Thanks.


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

Offline

 

#2 2008-11-21 16:36:03

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Double Jumping

Oh I am guessing that you want to make some sort of ssb game if you want double jumps  wink

So basically its like this

There is a variable called doubleJump. When you are touching the ground set the variable to 0. In the air when the user presses the jump button if the doubleJump variable is equal to 0 set gravity to -10 or something like that and set the doubleJump variable to 1.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2008-11-21 17:03:46

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

Re: Double Jumping

archmage wrote:

Oh I am guessing that you want to make some sort of ssb game if you want double jumps  wink

So basically its like this

There is a variable called doubleJump. When you are touching the ground set the variable to 0. In the air when the user presses the jump button if the doubleJump variable is equal to 0 set gravity to -10 or something like that and set the doubleJump variable to 1.

How'd you guess  wink  Thanks (again) for the help!  big_smile


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

Offline

 

#4 2008-11-21 17:07:01

TheSaint
Scratcher
Registered: 2008-11-04
Posts: 1000+

Re: Double Jumping

Yeah, I am Making one too. Archy, you should make one.

Offline

 

#5 2008-11-21 19:07:30

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Double Jumping

TheSaint wrote:

Yeah, I am Making one too. Archy, you should make one.

I am busy with school now and I really have to keep my grades high.

Maybe during the xmas break I'll make something.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#6 2008-11-21 19:28:50

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Double Jumping

archmage wrote:

TheSaint wrote:

Yeah, I am Making one too. Archy, you should make one.

I am busy with school now and I really have to keep my grades high.

Maybe during the xmas break I'll make something.

Grade high cuz ur a nerd lol just kidding. Also you already made an SSBB game. So you really don't have to bother.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#7 2008-11-21 19:38:21

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Double Jumping

Lucario621 wrote:

archmage wrote:

TheSaint wrote:

Yeah, I am Making one too. Archy, you should make one.

I am busy with school now and I really have to keep my grades high.

Maybe during the xmas break I'll make something.

Grade high cuz ur a nerd lol just kidding. Also you already made an SSBB game. So you really don't have to bother.

I wish I was a nerd because nerds are smart and get high grades  tongue

But really I am going to make a real SSB game because I want to see if I can get top loved of all time. I am not going to go on scratch next year because of university (hopefully) so I wanna leave my mark.  big_smile

Last edited by archmage (2008-11-21 19:38:48)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#8 2008-11-21 20:14:03

TheSaint
Scratcher
Registered: 2008-11-04
Posts: 1000+

Re: Double Jumping

What school are you thinking about?

Offline

 

#9 2008-11-21 20:18:54

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Double Jumping

TheSaint wrote:

What school are you thinking about?

I dunno, I am going to apply to a few different ones.
Ryerson is one that I was thinking of going to
http://www.ryerson.ca/home_nf.html

I want to get a Business Management degree.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#10 2008-11-21 20:28:48

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Double Jumping

archmage wrote:

TheSaint wrote:

What school are you thinking about?

I dunno, I am going to apply to a few different ones.
Ryerson is one that I was thinking of going to
http://www.ryerson.ca/home_nf.html

I want to get a Business Management degree.

Go to the University of Waterloo, it's an excellent university, really good if you're looking into computers. But maybe you don't want to...

At any rate, there's other courses there too.

Offline

 

#11 2008-11-21 20:37:27

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Double Jumping

coolstuff wrote:

archmage wrote:

TheSaint wrote:

What school are you thinking about?

I dunno, I am going to apply to a few different ones.
Ryerson is one that I was thinking of going to
http://www.ryerson.ca/home_nf.html

I want to get a Business Management degree.

Go to the University of Waterloo, it's an excellent university, really good if you're looking into computers. But maybe you don't want to...

At any rate, there's other courses there too.

Sorry, computer programming is more of a hobby for me. I want to work with money and make a lot of it  big_smile

Besides, I don't know if I could get into waterloo anyways because my average isn't in the 80s or higher.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#12 2008-11-22 05:51:54

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

Re: Double Jumping

archmage wrote:

Oh I am guessing that you want to make some sort of ssb game if you want double jumps  wink

So basically its like this

There is a variable called doubleJump. When you are touching the ground set the variable to 0. In the air when the user presses the jump button if the doubleJump variable is equal to 0 set gravity to -10 or something like that and set the doubleJump variable to 1.

Thanks it worked. Though I asume you meant set gravity to 10, instead of -10, or have I done something wrong?


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

Offline

 

#13 2008-11-22 06:18:40

TheSaint
Scratcher
Registered: 2008-11-04
Posts: 1000+

Re: Double Jumping

Cool.

Offline

 

#14 2008-11-22 12:16:18

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Double Jumping

Dan01 wrote:

archmage wrote:

Oh I am guessing that you want to make some sort of ssb game if you want double jumps  wink

So basically its like this

There is a variable called doubleJump. When you are touching the ground set the variable to 0. In the air when the user presses the jump button if the doubleJump variable is equal to 0 set gravity to -10 or something like that and set the doubleJump variable to 1.

Thanks it worked. Though I asume you meant set gravity to 10, instead of -10, or have I done something wrong?

I said -10 or something like that  wink

If it works then you did it right.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#15 2008-11-22 16:30:02

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

Re: Double Jumping

archmage wrote:

Dan01 wrote:

archmage wrote:

Oh I am guessing that you want to make some sort of ssb game if you want double jumps  wink

So basically its like this

There is a variable called doubleJump. When you are touching the ground set the variable to 0. In the air when the user presses the jump button if the doubleJump variable is equal to 0 set gravity to -10 or something like that and set the doubleJump variable to 1.

Thanks it worked. Though I asume you meant set gravity to 10, instead of -10, or have I done something wrong?

I said -10 or something like that  wink

If it works then you did it right.

It did work  big_smile  Thanks again XD


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

Offline

 

Board footer