I know the scripts and all but when i press the up button my guy jumps a little and then falls! Hlow can i make him go the full height of the jump before falling without interfering with the
<forever if> << <not> <touching color[ black >>
<repeat until> <touching color[ black
<change y by( -5
<end>
<if> <touching color[ black
<change y by( 2
<end>
<end>
block?
Offline
Try using 1 instead of 5 and 2. Than a more complicated way is gravity…
Offline
SuperSmashKid wrote:
I know the scripts and all but when i press the up button my guy jumps a little and then falls! Hlow can i make him go the full height of the jump before falling without interfering with the
<forever if> << <not> <touching color[ black >>
<repeat until> <touching color[ black
<change y by( -5
<end>
<if> <touching color[ black
<change y by( 2
<end>
<end>
block?
Variables will make it much, much smother than useing the change y icons. It will also be more realistic. Here is a simple script for you.
<when green flag clicked>
<forever>
<if> <key[ Up Arrow ]pressed?>
<set{ Y Velocity }to( 10
<wait until> <touching color[ Black
<end>
<if><touching color[ Black
<set{ Y Velocity }to( 1
<end>
<change y by( <{ Y Velocity }>
<change{ Y Velocity }by( -1
<end>
That should make it so the person jumps up, falls faster as time goes on and can only jump once. Also, he should stay on the ground if the ground is black. Hope this helped!
Offline
Bobby500 wrote:
Variables will make it much, much smother than useng the change y icons. It will also be more realistic. Here is a simple script for you.
<when green flag clicked>
<forever>
<if> <key[ Up Arrow ]pressed?>
<set{ Y Velocity }to( 10
<wait until> <touching color[ Black
<end>
<if><touching color[ Black
<set{ Y Velocity }to( 1
<end>
<change y by( <{ Y Velocity }>
<change{ Y Velocity }by( -1
<end>
That should make it so the person jumps up, falls faster as time goes on and can only jump once. Also, he should stay on the ground if the ground is black. Hope this helped!
And theres the complicated way
Offline
Yeah. I think he can handle it.
Offline