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

#1 2011-06-06 04:30:43

redman123
New Scratcher
Registered: 2011-05-18
Posts: 18

how to apply velocity to jump and land movement ?

Hi, All

I have checked the tutorial in scratch wiki.
http://wiki.scratch.mit.edu/wiki/Velocity

I have no problem in using velocity in the moving forward and backward.
However, I find it difficult to apply velocity to jumping and landing movement.
I have also checked http://scratch.mit.edu/projects/archmage/331446 .
It seems that the project is too complex for me to understand.

Please help with this.

at present , the following is the only methon that I know.
But I would like to learn more about advanced scrpit.
<when green flag clicked>
<forever>
<if><key[up arrow  ]pressed?>
<repeat( 5)
<change y by( 1)
<wait( 1 )secsc>
<repeat( 5)
<change y by( -1)
<end>
<end>
<end>

Offline

 

#2 2011-06-06 08:20:41

redman123
New Scratcher
Registered: 2011-05-18
Posts: 18

Re: how to apply velocity to jump and land movement ?

Thanks for the viewing.
I found the answer in the following project.
http://scratch.mit.edu/projects/archmage/72848

Offline

 

#3 2011-06-06 08:25:27

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: how to apply velocity to jump and land movement ?

I think you should do it like this:

Code:

when green flag clicked
forever
  if <<touching color[ color of your border]> or <key[ up arrow ]pressed?>>
   change [Y Velocity] by (1)
  else
    change [Y Velocity] by (-1)

I'm not sure though...

EDIT: Didn't see you found it. ^^

Last edited by scimonster (2011-06-06 08:26:06)

Offline

 

#4 2011-06-06 09:31:29

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: how to apply velocity to jump and land movement ?

I started a trend. Awesome.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&amp;link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&amp;link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

#5 2011-06-06 12:45:30

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: how to apply velocity to jump and land movement ?

I have several projects that show implementations of gravity - with various complexities.

Offline

 

Board footer