-
I'm making a game, and it has a spaceship in (movie clip). What I want the spaceship to do is this: When the game starts, the ships nose is faceing west. But, when I want to move the ship up, I want the ship's nose to face north, now.
I have the spaceship controlled by the directional keys. I tryed if/else statements, but that didn't work:
I saw this explained somewhere--how to do it!
-
All you have to do is change the ship's angle..
so it would go something like this:
_root.ship1._angle = (_root.ship1._angle + 90);
put this inside of your "key.isDown" event.
The angle is 0 to 360 degrees, and you can even make an if statement so that it keeps adding or subtracting 1 from the angle of the ship each frame until the ship is pointing north -- that way you can make actually rotate upwards instead of it just all of a sudden facing north
(this is if you're making the game in Flash 5)
[Edited by ouest_cote on 12-22-2000 at 12:30 AM]
-
Nevermind, I just used setPropety("", _rotation, #); for this. I'm sure there is better way. Anyone know?
-
[Devil in DarkGreen]
you can change some instance named movie clip as :
mc._rotation=XXX;
that XXX is 0-360
DS
-
Ooops, sorry i wrote _angle instead of _rotation.. i don't know what i was thinking.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|