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

#1 2009-06-10 05:28:38

ColonelMoran
Scratcher
Registered: 2009-06-10
Posts: 8

Jumping...

Right...
I'm new to Scratch, and can see some real potential here.
At the moment I'm not actually working on creating a game or animation, I'm just experimenting with different elements, so far I've got a character to move around a blank background, what I'd like to know is how to get the little fella to jump (kind of in a platform style).
Any advice?
Cheers

Offline

 

#2 2009-06-10 07:23:05

zbugni
Scratcher
Registered: 2008-12-13
Posts: 500+

Re: Jumping...

Jumping is something I couldn't do when I started scratch.  I looked all around, and this was the tutorial that showed you how to create the most realistic jump. 

http://scratch.mit.edu/projects/AlanProjects/198887

Offline

 

#3 2009-06-10 07:24:29

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Jumping...

your gonna need to use a gravity or yvel variable. If the character is touching a platform, this variable will be 0, else the variable will increment with a negative value (change by -1). Then simply make the y position change by the variable.

Offline

 

#4 2009-06-10 08:34:28

demosthenes
Retired Community Moderator
Registered: 2008-02-19
Posts: 1000+

Re: Jumping...

You can go here to find a comprehensive jumping tutorial  smile


I've taken a long hiatus, but I still visit sometimes. Give me some time to answer any messages you post on my projects!

Offline

 

#5 2009-06-11 07:52:40

ColonelMoran
Scratcher
Registered: 2009-06-10
Posts: 8

Re: Jumping...

demosthenes wrote:

You can go here to find a comprehensive jumping tutorial  smile

Go where?
smile

Offline

 

#6 2009-06-11 08:22:10

ColonelMoran
Scratcher
Registered: 2009-06-10
Posts: 8

Re: Jumping...

zbugni wrote:

Jumping is something I couldn't do when I started scratch.  I looked all around, and this was the tutorial that showed you how to create the most realistic jump. 

http://scratch.mit.edu/projects/AlanProjects/198887

Absolutely prefect!
Thanks for that....
smile

Offline

 

#7 2009-06-11 08:50:39

ColonelMoran
Scratcher
Registered: 2009-06-10
Posts: 8

Re: Jumping...

Ah...additional question.
I've got the little fella jumping around quite happily, and when he reaches another platform he lands, this was based on <touching colour>. However, this does mean that if his head touches the underside of the platform he stays there.
What can I do about him only landing the jump if he lands on his feet?
Cheers

Offline

 

#8 2009-06-11 08:55:07

ColonelMoran
Scratcher
Registered: 2009-06-10
Posts: 8

Re: Jumping...

I've just tried uploading it to the website, but I think the server here at work is being a tad stroppy.
I'll try again from home.

Offline

 

#9 2009-06-11 14:41:49

ColonelMoran
Scratcher
Registered: 2009-06-10
Posts: 8

Re: Jumping...

Right this is it so far...
http://scratch.mit.edu/projects/ColonelMoran/566205
Like I say, it's more a test and experiment than anything else.

Offline

 

#10 2009-06-11 14:45:43

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

Re: Jumping...

Try looking at the code in this project http://scratch.mit.edu/projects/archmage/101212

Last edited by archmage (2009-06-11 14:46:44)


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

 

#11 2009-06-11 15:26:02

ColonelMoran
Scratcher
Registered: 2009-06-10
Posts: 8

Re: Jumping...

archmage wrote:

Try looking at the code in this project http://scratch.mit.edu/projects/archmage/101212

Cool thanks Archmage...
So you create a frame around the sprite?

Offline

 

Board footer