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

#1 2012-12-30 01:44:52

BunnyFire
New Scratcher
Registered: 2012-12-18
Posts: 7

How to make jumping controls

plz help me i need it for a school project :3

Offline

 

#2 2012-12-30 01:49:20

Gravitation
New Scratcher
Registered: 2012-09-26
Posts: 500+

Re: How to make jumping controls

This belongs in Help with Scripts, so I'm asking for it to be moved.  smile

If you mean, jumping, like, in a platformer, you'll need velocity and ground detection. In other words, a sensor costume or sprite.

See this page for more info.  smile

Offline

 

#3 2012-12-31 11:53:09

minecraftpe123
Scratcher
Registered: 2012-11-18
Posts: 100

Re: How to make jumping controls

BunnyFire wrote:

plz help me i need it for a school project :3

When space is pressed, repeat 10 times(y=y+2) then repeat 10 times(y=y-2). This will give you a basic jump animation.

Hope this helped,
                         MINECRAFTPE123

Offline

 

#4 2013-01-01 00:31:22

mrn0body
Scratcher
Registered: 2012-12-11
Posts: 37

Re: How to make jumping controls

when gf clicked
forever
if <key [space v] is pressed
repeat [10] times
change y by [5]
end
repeat [10] times
change y by [-5]
end
end
end
Just so you can see a bit better


Why Fit In When You Were Born To Stand Out

Offline

 

#5 2013-01-01 00:36:28

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: How to make jumping controls

mrn0body wrote:

when gf clicked
forever
if <key [space v] pressed?>
repeat (10)
change y by (5)
end
repeat (10)
change y by (-5)
end
end
end
Just so you can see a bit better

Even better  wink

Last edited by Hardmath123 (2013-01-01 00:36:40)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#6 2013-01-01 08:17:53

lalala3
Scratcher
Registered: 2008-10-03
Posts: 100+

Re: How to make jumping controls

Or, even better than that:

Gravitation wrote:

This belongs in Help with Scripts, so I'm asking for it to be moved.  smile

If you mean, jumping, like, in a platformer, you'll need velocity and ground detection. In other words, a sensor costume or sprite.

See this page for more info.  smile

1. Person gets better script with velocity.
2. Person also learns of the Scratch Wiki.

It's a much better deal, in my opinion, than simply handing an answer out on a silver platter.


http://img515.imageshack.us/img515/9374/signature2nt.png

Offline

 

Board footer