This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-05-09 11:50:00

zwigger
Scratcher
Registered: 2010-05-09
Posts: 4

Direction of travel

I am making a galaga game but I can't get my spaceship sprite to move left.  It has a blue line that makes it move right, but i can't change it's direction without it flipping upside down.  I need help, thanks.    smile

Offline

 

#2 2010-05-09 11:59:48

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: Direction of travel

If you want to reverse the direction of travel, type a negative number into the white box. However, this will make the sprite seem to move backwards.

To make the script seem to move forwards at all times, simply duplicate the costume, and flip it in the paint editor (there are some buttons in the top left of the paint editor - click the one that looks like a vertical line with a semicircle either side) to make it face the other way. You can then use a script that looks like this: [blocks]

<when green flag clicked>
<forever>
<if><key[ right arrow ]pressed?>
<switch to costume[ facing right
<move( number )steps>
<end>
<if><key[ left arrow ]pressed?>
<switch to costume[ facing left
<move( negative number )steps>
<end>
<end>
[/blocks]

Hope this helps  big_smile


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

#3 2010-05-11 18:04:29

zwigger
Scratcher
Registered: 2010-05-09
Posts: 4

Re: Direction of travel

Thanks!!!!! I played around with it for a while and in the top corner where it shows the sprite with the blue line, if you click the box with the square in it that says don't rotate it works fine. XD I'm happy now!!!!!!!!!!!!!!!!!!!!

Offline

 

#4 2010-05-11 19:12:27

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Direction of travel

Or, you could also change the direction without flipping it upside-down by clicking the button that looks like this: <-> . It's up in the Sprite Pane, where it has all the sprite information like X and Y position, and it's also where the box with the square in it that you mentioned.

Offline

 

#5 2010-05-12 16:25:38

zwigger
Scratcher
Registered: 2010-05-09
Posts: 4

Re: Direction of travel

yeah what you just said that was what I meant in my earlier post, thanks anyway!!!!  smile

Offline

 

Board footer