sry but im trying to create a character that walks in an environment. i wonder what are the best scripts that are used to make it.
sry if this has already been asked..
Im lookin for block commands not suggestions on finding the commands. any bit that i havent mentioned would help..
Last edited by Test_Guardian (2009-05-07 08:33:15)
Offline
Thats ok..heres how to make it walk
<when[ right arrow ]key pressed>
<move(10)steps>
Repeat this for left but make the steps -10
now for up and down
<when[ up]key pressed>
<change y by( 10)
Now repeat this again for down and make the 10 a -10
Offline
i figured this one but the character looks wrong.. sry...
Offline
yep, never use the block heads for movment
use a forever loop with the if statements inside them
Offline
yambanshee wrote:
yep, never use the block heads for movment
use a forever loop with the if statements inside them
yep definitely, this is the above shown:
<when green flag clicked>
<forever>
<if><key[ right ]pressed?>
<change x by( 5 )>
<end>
<if><key[ left ]pressed?>
<change x by( -5 )>
<end>
<if><key[ up ]pressed?>
<change y by( 5 )>
<end>
<if><key[ down ]pressed?>
<change y by( -5 )>
<end>
<end>
Offline
Dibbo222 wrote:
yambanshee wrote:
yep, never use the block heads for movment
use a forever loop with the if statements inside themyep definitely, this is the above shown:
<when green flag clicked>
<forever>
<if><key[ right ]pressed?>
<change x by( 5 )>
<end>
<if><key[ left ]pressed?>
<change x by( -5 )>
<end>
<if><key[ up ]pressed?>
<change y by( 5 )>
<end>
<if><key[ down ]pressed?>
<change y by( -5 )>
<end>
<end>
Or there is a "forever if" block, which is a "forever" block and an "if" block all in one. It keeps checking if the script is true all the way through the project, whereas if you put an "if" block inside a "forever" block, it may mean that once you've pressed the right arrow, the sprite will keep moving forever. In other words, until you press the stop button.
Offline
pokemon_master12 wrote:
Or there is a "forever if" block, which is a "forever" block and an "if" block all in one. It keeps checking if the script is true all the way through the project, whereas if you put an "if" block inside a "forever" block, it may mean that once you've pressed the right arrow, the sprite will keep moving forever. In other words, until you press the stop button.
![]()
It doesn't do that.
Offline
Pokeman_master645 wrote:
Or there is a "forever if" block, which is a "forever" block and an "if" block all in one. It keeps checking if the script is true all the way through the project, whereas if you put an "if" block inside a "forever" block, it may mean that once you've pressed the right arrow, the sprite will keep moving forever. In other words, until you press the stop button.
![]()
Actually no. It doesn't need that, it does not keep on forever, maybe you should test this out?
Last edited by keroro645 (2009-05-07 17:54:30)
Offline
keroro645 wrote:
Pokeman_master645 wrote:
Or there is a "forever if" block, which is a "forever" block and an "if" block all in one. It keeps checking if the script is true all the way through the project, whereas if you put an "if" block inside a "forever" block, it may mean that once you've pressed the right arrow, the sprite will keep moving forever. In other words, until you press the stop button.
![]()
Actually no. It doesn't need that, it does not keep on forever, maybe you should test this out?
http://scratch.mit.edu/projects/bhz/517354
Last edited by bhz (2009-05-07 18:34:44)
Offline
bhz wrote:
keroro645 wrote:
Pokeman_master645 wrote:
Or there is a "forever if" block, which is a "forever" block and an "if" block all in one. It keeps checking if the script is true all the way through the project, whereas if you put an "if" block inside a "forever" block, it may mean that once you've pressed the right arrow, the sprite will keep moving forever. In other words, until you press the stop button.
![]()
Actually no. It doesn't need that, it does not keep on forever, maybe you should test this out?
http://scratch.mit.edu/projects/bhz/517354
Nice way to help fellow scratchers!Keep up the great work bhz!
Offline
DawnLight wrote:
bhz wrote:
keroro645 wrote:
Actually no. It doesn't need that, it does not keep on forever, maybe you should test this out?http://scratch.mit.edu/projects/bhz/517354
Nice way to help fellow scratchers!Keep up the great work bhz!
that doesn't really add any informaton to the problem
Offline
aww, i thought i had reliable help...
Offline
Test_Guardian wrote:
aww, i thought i had reliable help...
what do you mean?
Offline
no one is talking about a way to solve my problem, it's been weeks since it's been properly answered now
Offline
Some one already posted a script to move in 4 directions, what more do you want?
Offline