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

#1 2010-07-04 05:51:50

Gveradux
Scratcher
Registered: 2010-06-18
Posts: 100+

Need help with sprite moving on platform.

Hi. Im using the SCROLLX thing and I want my sprite to walk on top of aanythin black when he moves.

Offline

 

#2 2010-07-04 07:19:54

Greentabby55
Scratcher
Registered: 2010-05-04
Posts: 50

Re: Need help with sprite moving on platform.

Just add this to the script.


For moving right:

<if><key[ right arrow ]pressed?>
<set{ ScrollX }to( How fast you want to move
<end>

For moving left:

<if><key[ left arrow pressed ]pressed?>
<set{ ScrollX }to( Same speed as before, but a negative number.
<end>

Make sure you're moving the same speed as scrollX, so there should be a block like this somewhere in your script.

<move( <{ ScrollX }> )steps>

Offline

 

Board footer