Man, I am struggling with this...
I got the player ( aka Lana ) to bounce back. But it still doesn't take into account if she is facing away from the enemy when she is attacked. And sometimes it's totally unpredictable...
UHG~
Here's my messy code:
CODE-----------------------------------
while( my ){
my.pan = angle;
v += speed * time_frame;
if( v >= 30 ){ v = 30; }
if( v <= 0 ){ v = 0; }
//lana was hit
if( my.skill1 == 1 ){
v = 30;
b = -0.62; //bounce amount
}else{
b = 1;
}//end if
dx = (v*b) * cos( angle );
dy = (v*b) * sin( angle );
lanaMove.x = dx * time_frame;
lanaMove.y = dy * time_frame;
lanaMove.z = 0;
c_move( lana , nullvector , vector( lanaMove.x , lanaMove.y , lanaMove.z ) , GLIDE | IGNORE_PASSABLE );
wait( 1 );
}//end while
CODE-----------------------------------