jessprogramminginc

 

Scratch Tutorial

Page history last edited by Jes Stayton 1 yr ago

How to make your Sprite walk(or jump, swim etc,)

 

1) Under control, put the command that says: when______ key pressed under the script tab

 

2) Select the key that you want the motion to happen in response to (so that it walks, runs etc. when you press this key) in the command where it says space.(press the arrow pointing down to select the key)

 

3) put the command that says repeat 1 under the when_____ key pressed command on the script. Click on the 1 to type in the number of times you want the action to repeat every time you press whatever key you selected previously

 

4) Put the point in direction 90 from under motion in the repeat 1 command. This keeps the sprite facing in one direction.

 

5) Put the next in the repeat 1.

 

6) make 2 costumes that go with the action you want your sprite to do (so if you want it to run make it's legs move from one costume to another, and so on)

 

7) Select the first of your two costumes in the chnage costume to command.

 

8) put the wait seconds command under the previous command. Adjust this as you wish. The wait seconds command is needed so that the costumes do not switch faster than a person can really see.

 

9) repeat steps 7 and 8 with your second costume

 

10) Put the chnage x by change y by next in the repeat. the order of these commands does not matter.

 

11) If you want your sprite to move vertically leave x as 0, and change y to a number. (a negative number is down, a positive number is up) If you want your sprite to move horizantally leave y as 0 and change x. (a negative number is to the left, a positive number is to the right) To make your sprite move diagonally change both.

 

12) Put the if on edge bounce(from motion) next, or else your sprite can walk, run, jump etc. off the page.

 

13) Add in the stop all command (from control) or else the action will go on after you stop pressing the button

 

14) Congratulations! you are done! Here is basically what your completed code should look like.

Comments (0)

You don't have permission to comment on this page.