First things first ive never used the forums on here so i am sorry if this is in the wrong place.
The thing i need help with is...to make its so my sprite can move along a line as in when it goes up a hill it moves up it while i command it not just making it glide.
it would be great if you can tell me what i need to do.
Offline
You mean like line sensing? Try this:
<when green flag clicked>
<forever>
<if><touching color[ ground
<change y by( 1
<else>
<change y by( -1
That will work. And good job, right place
Offline
Cassorole wrote:
thank you very much
Don't forget to post a link here when you are done
Offline
Cassorole wrote:
do you know hoe to make it jump e.g. when space pressed jump??
Well, I will show you to different ways 1 gravity, 1 not:
<when[ space ]key pressed>
<if><touching color[ ground
<set{ gravity }to( 6
<change y by( <{ gravity }>
<repeat until><touching color[ ground
<change{ gravity }by( -0.2
<change y by( <{ gravity }>
<end>
<set{ gravity }to( 0
Now way 2:
<when[ space ]key pressed>
<if><touching color[ ground
<repeat( 10
<change y by( 5
<end>
<repeat( 10
<change y by( -5
<end>
Offline