well this is my 1-st try at makeing a game, and so far its going as i want it to.
but now i have a problem, i want my MC (Man) to be able to atack in 2 directions (Left and Right) depending on the _xscale (or something else), and i need help for the code.
here is what i have:
MC: Man
MC: Star (the thing that has to fly the way my MC (Man) is facing)
Plz help me in any way you can.
Look down a few posts. “Attacking in Multiple Directions”. It worked great for me.
allready did that before i posted, but no luck.
well i dont know wot ur variables are but i will guess from wot u have.
onClipEvent (load) {
speed = 5;
ducking = false;
scale = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT) && ducking == false) {
_x -= speed;
this.gotoAndStop(2);
_xscale = -scale;
} else if (Key.isDown(Key.RIGHT) && ducking == false) {
_x += speed;
this.gotoAndStop(2);
_xscale = scale;
} else if (Key.isDown(Key.DOWN)) {
this.gotoAndStop(4);
ducking = true;
} else {
this.gotoAndStop(1);
ducking = false;
}
}
i attached an FLA to if u want it.
nope thats not what i am looking for, i got the walking down and every thing its “Attacking Left and Right” i cant get to work.
Sorry just saw you can attach files, so if you want to have a look plz do.
well never mind, i just got it working (-:
Well same Game New problem.
the problem is when i jump up on the platform going upwards and walking on it, instead of my MC(Man) going up he just goes through the platform, what am i doing rong? help plz