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

#1 2008-08-01 15:54:34

Cassorole
Scratcher
Registered: 2008-08-01
Posts: 7

Help im having trouble

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

 

#2 2008-08-01 15:56:24

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Help im having trouble

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  big_smile


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#3 2008-08-01 15:57:27

Cassorole
Scratcher
Registered: 2008-08-01
Posts: 7

Re: Help im having trouble

thank you very much

Offline

 

#4 2008-08-01 15:59:43

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Help im having trouble

Cassorole wrote:

thank you very much

Don't forget to post a link here when you are done  wink


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#5 2008-08-01 16:00:37

Cassorole
Scratcher
Registered: 2008-08-01
Posts: 7

Re: Help im having trouble

do you know hoe to make it jump e.g. when space pressed jump??

Offline

 

#6 2008-08-01 16:03:52

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Help im having trouble

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>


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#7 2008-08-01 16:17:58

Cassorole
Scratcher
Registered: 2008-08-01
Posts: 7

Re: Help im having trouble

thak you so much guys my game will be done soon

Offline

 

Board footer