Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to make your sprite move left and right
- joshly50
-
81 posts
How to make your sprite move left and right
To make your sprite move left and right follow this script
To move right
Go to events and drag block called (When space key pressed) change it to (When right arrow key pressed)
Then go to motion and drag move 10 steps and change it to 30 and snap the blocks together.
To move left
Go to events and drag block called (When space key pressed) change it to (When left arrow key pressed)
Then go to motion and drag move 10 steps and change it to -30 and snap the blocks together.
To move right
Go to events and drag block called (When space key pressed) change it to (When right arrow key pressed)
Then go to motion and drag move 10 steps and change it to 30 and snap the blocks together.
To move left
Go to events and drag block called (When space key pressed) change it to (When left arrow key pressed)
Then go to motion and drag move 10 steps and change it to -30 and snap the blocks together.
- andre_rifaut_tests
-
90 posts
How to make your sprite move left and right
This is correct.
But you can add some fun.
For instance just try with the cat:
The cat will move 30 steps but you will see it move its feet.
But you can add some fun.
For instance just try with the cat:
The cat will move 30 steps but you will see it move its feet.
- KermitMC
-
100+ posts
How to make your sprite move left and right
There is a much better way than that. This is correct.
But you can add some fun.
For instance just try with the cat:
The cat will move 30 steps but you will see it move its feet.
Hope this helps
Last edited by KermitMC (Nov. 30, 2013 15:12:11)
- GadgetAndyMan
-
100+ posts
How to make your sprite move left and right
Yes the if key pressed option allows for a faster response. If that isn't needed or not suitable for your project, then the when key pressed block does the job.
- digthebone
-
500+ posts
How to make your sprite move left and right
hopefully that helped

and always remember

- digthebone
-
500+ posts
How to make your sprite move left and right
hopefully that helped
and always remember
- turkey3
-
1000+ posts
How to make your sprite move left and right
Those could be combined into one, more efficient script.
hopefully that helped
and always remember]
- Scratching_Vornado
-
14 posts
How to make your sprite move left and right
Using
isn't very good as it doesn't work very well. Sometimes it moves once, stops, then moves forward again. As other people said, you should do something like this:
Maybe through in a
in there.
isn't very good as it doesn't work very well. Sometimes it moves once, stops, then moves forward again. As other people said, you should do something like this:
Maybe through in a
in there.
- typemaster
-
100+ posts
How to make your sprite move left and right
X and Y are the coordinates of the location of the sprite as you probably already know.
Here is the most efficient way to make a sprite move left and right:
Hope I helped you!
You will find that most of my projects use those scripts that I gave you.
Here is the most efficient way to make a sprite move left and right:
Hope I helped you!
You will find that most of my projects use those scripts that I gave you.
- Nyan_Banana
-
14 posts
How to make your sprite move left and right
You just need When Flag Clicked change x by (how ever much you want). If you want it to go left make it a minus number
Last edited by Nyan_Banana (March 17, 2015 13:46:36)
- Starvia
-
17 posts
How to make your sprite move left and right
How do you make scratchblocks?
- GyroscopeBill
-
500+ posts
How to make your sprite move left and right
When you make a post, look at the icons above the bit where you type. One of those is a small blue block with a down arrow next to it. Click on there and you can then click on the blocks. Alternatively, you can do what I do and type them manually. How do you make scratchblocks?
- minecrafternotch
-
3 posts
How to make your sprite move left and right
In the latest version of scratch it's easy.Two ways are with a mouse,and by arrow keys
Mouse
Arrows:
end
Mouse
Arrows:
end
- Discussion Forums
- » Help with Scripts
-
» How to make your sprite move left and right