I want my sprite to point in the direction of left when I press the left arrow key instead of going left and staying faced right? How do I do this? Please help!
Offline
Ruso306444 wrote:
I want my sprite to point in the direction of left when I press the left arrow key instead of going left and staying faced right? How do I do this? Please help!
Copy the sprites costume, then edit it and flip it. Then do
when [right arrow v] key pressed change x by (3)//change this to how fast you want your sprite to go. switch to costume [right v]//change this to your 'right facing' costume.
when [left arrow v] key pressed change x by (-3)//change this to how fast you want your sprite to go. switch to costume [left v]//change this to your 'left facing' costume.Hope this helps,
Last edited by topazdragonlord (2013-04-15 11:46:35)
Offline
You have two options:
1) You can say that when the left arrow key pressed (Control Block), turn 180 degrees (Motion Block, it doesn't matter which turning block you use). The problem with this is that some things (like the Scratch Cat) which are unsymmetrical become upside down but for things like arrows it's fine.
2) If you are doing something like the Scratch Cat then look at its costume/s and click to copy it. Now click to edit the version you have copied and in the top left hand corner you should see a little row of buttons. The first two grow and shrink, the second two rotate and the third two flip. Click " Flip horizontally" (second from last). Your costume should now be rotated to look left. Now make a small script like when the left arrow key pressed (Motion Block), switch to costume [costume facing left].
Hope this helps.
Offline
Alternately if you're going to use things like the scratch cat, there are three small, square buttons near the top left which change its rotation style. Click the middle one to set the rotation style to leftRight. Now if you turn 180 degrees it flips.
Offline
Thx guys!
Offline