Discuss Scratch

fayri2017
Scratcher
13 posts

Arrow Key Movement

How would I make a sprite move say about 5 steps up or down by pressing the arrow keys? I would like to know the blocks that I would need to use in order to complete this action as well as what I may need to put inside of those blocks. Thanks.
deck26
Scratcher
1000+ posts

Arrow Key Movement

5 steps or about 5 steps?

To move 5 steps up you either just change y by 5 or you point in direction 0 degrees and move 5 steps.

foreverifkeyup arrowpressed?thenchangeyby5ifkeydown arrowpressed?thenchangeyby-5 or other loop
fayri2017
Scratcher
13 posts

Arrow Key Movement

Hmm that didn't quite work… The sprite isn't moving. I have the left and right arrow keys down and that moves just fine but pressing up and down arrow keys don't work.
deck26
Scratcher
1000+ posts

Arrow Key Movement

Sharing the project always makes it easier to help.
fayri2017
Scratcher
13 posts

Arrow Key Movement

I got it to work now I found another forum online but thanks for helping me anyways!
_xXAnGeLzXx_
Scratcher
1 post

Arrow Key Movement

Thanks that helped me
whenclickedmove10steps

Powered by DjangoBB