PDA

View Full Version : character direction



i need help
February 23rd, 2005, 09:52 AM
so far i have this code...

if (Key.isDown(Key.RIGHT)) {
this._x+=moveSpeed;
} else if (Key.isDown(Key.LEFT)) {
this._x-=moveSpeed;
}
if (Key.isDown(Key.DOWN)) {
this._y+=moveSpeed;
} else if (Key.isDown(Key.UP)) {
this._y-=moveSpeed;
}
}

but how do i make it so that my character actually faces the direction it is moving in?

senocular
February 23rd, 2005, 10:04 AM
this might help:
http://www.senocular.com/flash/source.php?id=0.145

i need help
February 23rd, 2005, 10:25 AM
thats great..i wish i had done it that way at first....but for my guy i juss need sum action script to add on to wat i already have to make him rotate in the direction he is facing