how do you move a animal with arrow keys?
Offline
Ok Angelflower0, this is the script.
when gf clicked forever if <key [up arrow v] pressed?> point in direction (0 v) move (number of steps you want) steps end if <key [down arrow v] pressed?> point in direction (180 v) move (number of steps you want) steps end if <key [right arrow v] pressed?> point in direction (90 v) move (number of steps you want) steps end if <key [left arrow v] pressed?> point in direction (-90 v) move (number of steps you want) steps end
Last edited by Firedrake969 (2012-07-22 10:21:55)
Offline
Or you could use this:
when gf clicked forever if <key [left arrow v] pressed?> change x by (-10) //This number will determine how fast the sprite moves. end if <key [right arrow v] pressed?> change x by (10) end if <key [up arrow v] pressed?> change y by (10) end if <key [down arrow v] pressed?> change y by (-10) end end
Last edited by JH1010 (2012-07-22 11:08:03)
Offline
JH1010 wrote:
Or you could use this:
when gf clicked forever if <key [left arrow v] pressed?> change x by (-10) //This number will determine how fast the sprite moves. end if <key [right arrow v] pressed?> change x by (10) end if <key [up arrow v] pressed?> change y by (10) end if <key [down arrow v] pressed?> change y by (-10) end end
Angelflower, if you want it pointed in a certain direction, use my script.
Offline
Or:
when gf clicked forever if <key [up arrow v] pressed?> move (how fast you want to move) steps end if <key [down arrow v] pressed?> move (how fast you want to move backward [note: be sure that this number is negative.]) steps end if <key [right arrow v] pressed?> turn cw (how fast you want to turn right) degrees end if <key [left arrow v] pressed?> turn ccw (how fast you want to turn left) degrees endthis will move in the direction you are pointing, and you use the left and right arrow keys to turn.
Offline