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

#1 2010-02-13 21:26:52

ferretron5
Scratcher
Registered: 2010-02-13
Posts: 10

how do i give an object arrow key controls!?!?

pweese help

Offline

 

#2 2010-02-13 21:35:45

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: how do i give an object arrow key controls!?!?

There should be a sample project for that....
However, there are two options:
1)
<when[ up ]key pressed>
<change y by( 1)>

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

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

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

2)
<when green flag clicked>
<forever>
|<if><key[ up ]pressed?>
||<change y by( 1)>
|<end>
|<if><key[ down ]pressed?>
||<change y by( -1)>
|<end>
|<if><key[ left ]pressed?>
||<change x by( -1)>
|<end>
|<if><key[ right ]pressed?>
||<change x by( 1)>
|<end>
<end>

However, I think that you should not put this in advanced topics next time.
No offence, but it is really not a very advanced question.
See here: http://scratch.mit.edu/forums/viewtopic.php?id=30542


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#3 2010-02-14 12:28:32

ferretron5
Scratcher
Registered: 2010-02-13
Posts: 10

Re: how do i give an object arrow key controls!?!?

thank you sooo much  big_smile  i understand the conept now  big_smile

Offline

 

Board footer