Discuss Scratch

AlexiaLikesButter
Scratcher
35 posts

How To Do Smooth Movement

Are any of you having trouble with the movement of your characters in games? Read this then! This is how you make your sprite move very smoothly using the arrow keys:
whenclickedforeverifkeyleft arrowpressed?thenchangexby-5ifkeyright arrowpressed?thenchangexby5ifkeyup arrowpressed?thenchangeyby5ifkeydown arrowpressed?thenchangeyby-5
NOTE: when you do “up arrow” make sure you do “change Y by (any number), if you do ”down arrow“ you do ”change Y by (any NEGATIVE number, like -6 or -10).The same with right and left. Left is “change X by (any NEGATIVE number), and right is ”change X by (any number)
Hope this helped!! -Lexia
comment to this topic is your confused/need more detail/ want help!

Last edited by AlexiaLikesButter (Jan. 15, 2016 05:31:51)

O_boss
Scratcher
1 post

How To Do Smooth Movement

Thank you that helps me a lot
mrbobbygreathead
Scratcher
1000+ posts

How To Do Smooth Movement

If you're not using velocity variables the it would be better to do four individual of this to reduce lag:
whenclickedforeverwaituntilkey?pressed?repeatuntilnotkey?pressed?move?steps

Last edited by mrbobbygreathead (Jan. 18, 2016 17:02:46)

AlexiaLikesButter
Scratcher
35 posts

How To Do Smooth Movement

mrbobbygreathead wrote:

If you're not using velocity variables the it would be better to do four individual of this to reduce lag:
whenclickedforeverwaituntilkey?pressed?repeatuntilnotkey?pressed?move?steps
1. you could do those kind of scripts as well. 2. No thank you. But unless if you really want to, you can do a 8-bit art book with a potato on the cover :3. 3. sure, which studio would you like to curate?
peppino_spaghetti2
Scratcher
1 post

How To Do Smooth Movement

whenclickedforeverchangeyby5

Powered by DjangoBB