|
-
Maybe someone here can help.
I've got my main character moving about and so on using Key.isDown
No issues making her walk or crouch.
Where I am running into difficulty is in getting her to do her combo when you push the A key.
She has a jab, strong punch and a kick.
I've figued out actionscript uses numbers for keys. Not sure how to make it read the key I want.
I'd also like to make her jump, to play her jump animation to be specific, and to be able to move through the air while jumping. Then there is the jump attack. Looked into a tutorial on platform jumping, something I wanted in the game, it used action script 3.0 though. I'm still in Flash 8.
I have been doing the Beat 'em tutorials on making Spllaterhouse, and tried to contact the man who made them. No dice.
Maybe someone here can help.
My code so far:
sara.step=15;
sara.attack = false;
sara.stance= 1;
sara.crouch=false;
this.onEnterFrame = function()
{
if(sara.attack==false)
{
if (Key.isDown (Key.RIGHT) )
{
sara._xscale = 100;
sara.stance=1;
sara._x+=sara.step;
sara.gotoAndStop("walk");
}
else if (Key.isDown (Key.LEFT) )
{
sara._xscale = -100;
sara.stance=0;
sara._x-=sara.step;
sara.gotoAndStop("walk");
}
else if (Key.isDown (Key.DOWN) )
{
sara.gotoAndStop("crouch");
sara.crouch=true;
}
else if (!Key.isDown () )
{
sara.gotoAndStop("stance");
sara.crouch=false;
}
}
}
End Code
Thank you in advance.
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
|