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

#1 2011-08-03 05:05:08

SnookerCal227
New Scratcher
Registered: 2011-08-01
Posts: 1

Help with jumping please!

Okay, so basically, I have managed to make my sprite jump up and go back down again, but I have two questions:

Is there a way to make it so that the longer the space bar is held down, the higher it jumps?

And also, how can I make it so that if the sprite is running right, for example, and it jumps, it jumps up in the air, but it doesn't jump straight up, it jumps to the right?

Thanks

Offline

 

#2 2011-08-03 05:29:19

Flait7
Scratcher
Registered: 2008-04-14
Posts: 100+

Re: Help with jumping please!

to make it move right while jumping, make sure the jumping scripts and the movement scripts are separate, so that the two scripts can work at the same time.

To make it so the longer the space bar is held down, the higher it jumps. Maybe you could try something like uhh..

<wait until><<  <not> <key[ space ]pressed?> >>

and then continue with the script to move the sprite back down?


http://scratch.mit.edu/static/projects/Flait7/2248016_sm.pnghttp://scratch.mit.edu/static/projects/Flait7/1827934_sm.png

Offline

 

#3 2011-08-03 21:48:48

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Help with jumping please!

Flait7 wrote:

to make it move right while jumping, make sure the jumping scripts and the movement scripts are separate, so that the two scripts can work at the same time.

To make it so the longer the space bar is held down, the higher it jumps. Maybe you could try something like uhh..

<wait until><<  <not> <key[ space ]pressed?> >>

and then continue with the script to move the sprite back down?

or put the movement script  inside of the jumping part. or you could use velocity.

Offline

 

Board footer