Basic Movement
Ok just make a sprite (i.e sprite 1)
To get him to move you can use these scripts::
<when[ right arrow ]key pressed>
<change x by( _____
or
<when[ left arrow ]key pressed>
<change x by( -____
FOr more advanced Versions it might look like this ::
<when green flag clicked><forever><if><key[ right arrow ]pressed?><change{ velocityx }by( ____<set x to( <{ velocity x }><if><key[ left arrow ]pressed?><change{ velocityx }by( -___<set x to( <{ velocity x }>
Last edited by thewilddingo (2008-08-22 17:37:51)
Offline
thewilddingo wrote:
Basic Movement
Ok just make a sprite (i.e sprite 1)
To get him to move you can use these scripts::
<when[ right arrow ]key pressed>
<change x by( _____
or
<when[ left arrow ]key pressed>
<change x by( -____
FOr more advanced Versions it might look like this ::
<when green flag clicked>
<forever>
<if><key[ right arrow ]pressed?>
<change{ velocityx }by( 1
<end>
<if><key[ left arrow ]pressed?>
<change{ velocityx }by( -1
<end>
<change x by( <{ velocity x }>
Easier to read now
Last edited by Bluestribute (2008-08-22 17:39:41)
Offline
mletreat wrote:
Thanks for sharing with our new Scratchers...do you have any projects you could share that demonstrate this?
NOT at the moment
Offline
Heres the project http://scratch.mit.edu/projects/keroro645/248234
Offline
If you want basic jumping you could have 2 scripts the first would be.
When green flag pressed
forever
repeat until
touching colour (choose)
change Y by -1,2,3 etc
The second
When green flag pressed
forever
if up pressed and touching colour (choose)
Repeat (choose times)
change Y by 10
Sorry if this is hard to understand i can't use the block images
Offline