That is one way to make a sprite move; the sprite will follow the cursor forever once you press start, I'm sure you already know. It can be used in projects such as cursor games and paint projects.
There are other ways to control the sprites' movement, like with the arrow keys. You can use it in many types of game projects, like mazes and platforms.
when green flag clicked if<key [up v] pressed?> change y by (10) end if<key [down v] pressed?> change y by (-10) end if <key [left v] pressed?> change x by (-10) end if <key [right v] pressed?> change x by (10) end endThis is only one of the many ways you can use arrow keys to control sprites.
when green flag clicked forever point in direction (-90) glide (1) secs to x: (-219) y: (0) point in direction (90) glide (1) secs to x: (219) y:(0) endOr in a circle:
when green flag clicked forever move (15) steps turn cw (5) degrees endThose two can be used in animations and for AIs, among many other things.
Last edited by 12_lassy (2012-03-17 13:56:16)
Offline
SOScratch wrote:
I usually use this kind of script for sprite movement:
<when green flag clicked>
<if><key[ down ]pressed?>
<change y by( 10
Something like that.
For the down arrow key it should be -10, not 10
Offline