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

#1 2009-08-24 07:55:49

MajorMan
Scratcher
Registered: 2009-08-24
Posts: 4

Directional Keys

Does anyone know how to get your sprite to follow directional keys?

Offline

 

#2 2009-08-24 08:00:36

MajorMan
Scratcher
Registered: 2009-08-24
Posts: 4

Re: Directional Keys

<when green flag clicked><forever><key[D]pressed?><point in direction(D <move(1 )steps>. D means the direction you want to move in.

Offline

 

#3 2009-08-24 08:09:40

MajorMan
Scratcher
Registered: 2009-08-24
Posts: 4

Re: Directional Keys

I literally just got a boxhead sprite just as I made this post

Offline

 

#4 2009-08-24 08:10:47

Mawile
Scratcher
Registered: 2009-04-21
Posts: 100+

Re: Directional Keys

MajorMan wrote:

<when green flag clicked><forever><key[D]pressed?><point in direction(D <move(1 )steps>. D means the direction you want to move in.

Wouldn't a better idea for it to move X position by 1, And A for -1 X


I'm Registeel, Sadly i forgot my password :'(
http://img197.imageshack.us/img197/9941/cooking.jpghttp://img194.imageshack.us/img194/9608/telescopeweegee.jpg

Offline

 

#5 2009-08-24 08:12:53

Mawile
Scratcher
Registered: 2009-04-21
Posts: 100+

Re: Directional Keys

<when[ d ]key pressed>
<change x by( 1

<when[ a ]key pressed>
<change x by( -1

<when[ w ]key pressed>
<change y by( 1

<when[ s ]key pressed>
<change y by( -1

That's if you're using WASD control


I'm Registeel, Sadly i forgot my password :'(
http://img197.imageshack.us/img197/9941/cooking.jpghttp://img194.imageshack.us/img194/9608/telescopeweegee.jpg

Offline

 

Board footer