I have these two scripts:
<when green flag clicked>
<forever>
<if><touching color[ terrain color
<change y by( 1
and
<when green flag clicked>
<forever>
<if><< <not> >><touching color[ terrain color
<change y by( -2
I don't want the irritating bouncing, so how can I get rid of it?
Offline
You can use Yvelocity, if you want an explanation I'll post it. But with your method I think you could try:
<when[ ]clicked>
<forever>
<if><< <not> >><touching color[ (terrain color)
<change y by( -2
<else>
<change y by( 1
<if><< <not> >><touching color[ (terrain color)
<change y by( -1
<end>
<end>
EDITL ok, the if not touching colors turned out weird, but I know that it works (I just tried in scratch).
Last edited by juststickman (2010-01-16 03:46:04)
Offline
juststickman wrote:
You can use Yvelocity, if you want an explanation I'll post it. But with your method I think you could try:
<when[ ]clicked>
<forever>
<if><< <not> >><touching color[ (terrain color)
<change y by( -2
<else>
<change y by( 1
<if><< <not> >><touching color[ (terrain color)
<change y by( -1
<end>
<end>
EDITL ok, the if not touching colors turned out weird, but I know that it works (I just tried in scratch).
It still bounces.
Offline
Try using a smaller number for the [if touching terrain] bit. Maybe 0.01 or something.
Offline
Wolfie1996 wrote:
Try using a smaller number for the [if touching terrain] bit. Maybe 0.01 or something.
It won't fall as fast though when it's jumping.
Offline
Cookies100 wrote:
Wolfie1996 wrote:
Try using a smaller number for the [if touching terrain] bit. Maybe 0.01 or something.
It won't fall as fast though when it's jumping.
Keep the number in the falling script the same, just change the going up one Sorry if that wasn't too clear.
Offline
try this:
blocks
<when green flag clicked>
<forever>
<if><key[ up arrow ]pressed?>
<set{ gravity }to( 15
<change y by( <{ gravity }>
<end>
<repeat until><touching color[ terrain color
<change{ gravity }by( -1
<change y by( <{ gravity }>
<end>
<end>
/blocks
Offline