are you talking about move x block?<move( )steps>
Offline
Wow. Try this.
Make a sprite which is going to be the sprite that's moving and call it mover.
Then chuck on "mover"
[blocks]
<when green flag clicked>
<forever if><key[ right ]pressed?>
<change x by( 5
<end>
<when green flag clicked>
<forever if><key[ left ]pressed?>
<change x by( -5
<end>
<when green flag clicked>
<forever if><key[ up ]pressed?>
<change y by( 5
<end>
<when green flag clicked>
<forever if><key[ down ]pressed?>
<change y by( -5
<end>
[/blocks]
Press the green flag and try it. It should work.
Offline
For the above script, you can just use one "forever" loop and place all the if blocks inside it.
Last edited by hmnwilson (2010-03-06 16:05:46)
Offline
Stickman704 wrote:
Wow. Try this.
Make a sprite which is going to be the sprite that's moving and call it mover.
Then chuck on "mover"
[blocks]
<when green flag clicked>
<forever if><key[ right ]pressed?>
<change x by( 5
<end>
<when green flag clicked>
<forever if><key[ left ]pressed?>
<change x by( -5
<end>
<when green flag clicked>
<forever if><key[ up ]pressed?>
<change y by( 5
<end>
<when green flag clicked>
<forever if><key[ down ]pressed?>
<change y by( -5
<end>
[/blocks]
Press the green flag and try it. It should work.
I don't mean that. I mean a platformer game.
Offline
hmnwilson@ I know but It can run smoother if you do it
Ben@ Oh right. Ok. Well what better way to explain it than using another page. Archamge's advice on a platformer @ http://archblogger.wordpress.com/2008/1 … orld-demo/
Last edited by Stickman704 (2010-03-07 10:40:41)
Offline