Hi there, my names matt, I posted on here a bit ago with a few questions regarding the development of my 2.5d as3 beat em up. Im almost done, but i need some ideas as i have hit a road block.
Currently my main character dosent get knocked over, i have triggers for this to happen (enemy kick ect). The problem is i cant seem to get my main character to stay down and complete the “get up” animation.
I beleive the problem is with key presses, as soon as i press a key (left, right, up, down ect) the “get up” animation is broken and the character goes to the “walking animation”
the code I am using to trigger the “knock down sequence is as follows”
*if (OM.OMabox.hitTestObject(hero))
{
{
hero.gotoAndStop("HeroKnockDown");
}
};*
the code for walking is as follows
function EnterFrame(event:Event):void
{
if (Left)
{
hero.x -= speed;
hero.scaleX = -1.3;
if (hero.currentLabel != ("walking"))
{
hero.gotoAndStop("walking");
}
}
if (Right)
{
hero.x += speed;
hero.scaleX = +1.3;
if (hero.currentLabel != ("walking"))
{
hero.gotoAndStop("walking");
}
}
if (Up)
{
hero.y -= speed;
if (hero.currentLabel != ("walking"))
{
hero.gotoAndStop("walking");
}
}
if (Down)
{
hero.y += speed;
if (hero.currentLabel != ("walking"))
{
hero.gotoAndStop("walking");
}
}
}
any help is much appreciated,
regards Matt!