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

#1 2008-04-04 10:30:34

big-bang
Scratcher
Registered: 2008-02-21
Posts: 1000+

Control Freak-ing out

How do I encode a jump in Scratch that works like this: you press up and then left or right. I tried this a while ago and I never figured it out. Help me please!!!


http://i47.tinypic.com/6edrbm.jpghttp://i45.tinypic.com/dw9hmw.jpghttp://i50.tinypic.com/f28tvn.jpghttp://i45.tinypic.com/ruwaop.jpg

Offline

 

#2 2008-04-04 18:49:22

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Control Freak-ing out

If you mean moving during a jump I'm not an expert, because I *think* I only used that once (and a few months ago at that, although I need it for a game I'm making right now), but if you just put the movement and jumping in completely different scripts, I think it works. But if you need different costumes for being in the air, it might be a bit different.

Last edited by hmnwilson (2008-04-04 18:53:12)


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#3 2008-04-04 19:47:30

Hobbs1100
Scratcher
Registered: 2008-02-16
Posts: 500+

Re: Control Freak-ing out

You do this:
<when[ up arrow ]key pressed>
<change y by( 20 )
<wait( 0.2 )secsc>
<change y by( -20 )

It should work. This is my first time using blocks on the forums. But it should work.

Offline

 

#4 2008-04-05 17:28:17

big-bang
Scratcher
Registered: 2008-02-21
Posts: 1000+

Re: Control Freak-ing out

Will try that now, thanks for helping!


http://i47.tinypic.com/6edrbm.jpghttp://i45.tinypic.com/dw9hmw.jpghttp://i50.tinypic.com/f28tvn.jpghttp://i45.tinypic.com/ruwaop.jpg

Offline

 

#5 2008-04-05 18:03:43

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: Control Freak-ing out

The best way is to youse x and y velocity variables, and a variable "Jump" this way you can add if statements, an you can change horizontal movement depending on your character's jumping or not.

I suggest to use forever { if key ... pressed )
instead of the when key pressed hat - with the hat it won't react with two keys pressed at the same time.h


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#6 2008-04-05 18:10:16

big-bang
Scratcher
Registered: 2008-02-21
Posts: 1000+

Re: Control Freak-ing out

JSO wrote:

The best way is to youse x and y velocity variables, and a variable "Jump" this way you can add if statements, an you can change horizontal movement depending on your character's jumping or not.

I suggest to use forever { if key ... pressed )
instead of the when key pressed hat - with the hat it won't react with two keys pressed at the same time.h

Yeah it didn't work...


http://i47.tinypic.com/6edrbm.jpghttp://i45.tinypic.com/dw9hmw.jpghttp://i50.tinypic.com/f28tvn.jpghttp://i45.tinypic.com/ruwaop.jpg

Offline

 

Board footer