Post by Admin on Jan 5, 2015 21:59:07 GMT
Hey guys, this is my first tutorial on this form where I will be teaching you how to do the
Moving Sprite Tutorial
Time This Tutorial Takes : 5 - 10 minutes
Okay guys, so this tutorial is fairly simple. First we must open up our Scratch and use the sprite you want to control with the arrow keys. Click on the cat now. And let's begin this tutorial.
Drag the 'When Green Flag Clicked' block into the script to begin the tutorial.
So now you must copy this script. I will explain why.
Lets get this straight.
Change Y By 10 = this means going 10 steps up because when y is positive it goes north
Change Y By -10 = this means going 10 steps down because when y is negative it goes south
Confusing?
Not really that confusing, so if up arrow key is pressed then it goes north. The script must go on 'forever' so that is why it has been added.
Now that we have the knowledge of that we can add the down arrow controls. This is how your script should look.
Does it look like that? Let's move on.
We have not talked about the X-axis, which is basically horizontal. So how should the next script go?
When green flag clicked
forever
if key right arrow pressed then
change x by -10
That script is WRONG and I will tell you why.
change x by 10 is going 10 steps in the right direction.
change x by -10 is going 10 steps in the left direction.
Now we can adopt that knowledge and put it into a script.
Your script should look like that. Now press the green flag, place your fingers on the arrow keys and see the magic!
Thanks for taking this tutorial. Comment if you have any problems or errors with this script. (you shouldn't have errors)
Time This Tutorial Takes : 5 - 10 minutes
Okay guys, so this tutorial is fairly simple. First we must open up our Scratch and use the sprite you want to control with the arrow keys. Click on the cat now. And let's begin this tutorial.
Drag the 'When Green Flag Clicked' block into the script to begin the tutorial.
So now you must copy this script. I will explain why.
Lets get this straight.
Change Y By 10 = this means going 10 steps up because when y is positive it goes north
Change Y By -10 = this means going 10 steps down because when y is negative it goes south
Confusing?
Not really that confusing, so if up arrow key is pressed then it goes north. The script must go on 'forever' so that is why it has been added.
Now that we have the knowledge of that we can add the down arrow controls. This is how your script should look.
Does it look like that? Let's move on.
We have not talked about the X-axis, which is basically horizontal. So how should the next script go?
That script is WRONG and I will tell you why.
change x by 10 is going 10 steps in the right direction.
change x by -10 is going 10 steps in the left direction.
Now we can adopt that knowledge and put it into a script.
Your script should look like that. Now press the green flag, place your fingers on the arrow keys and see the magic!
Thanks for taking this tutorial. Comment if you have any problems or errors with this script. (you shouldn't have errors)