kingofnukes
September 1st, 2006, 12:37 AM
Hi, I'm working on a character class and im having a few problems.
My class was working fine untill i noticed when my MC's inside the Char MC weren't animating.
After noticing that, I rearanged my code to change the priority of action around to accmidate the nessicary attacks/actions.
I finnaly fixed them all myself excluding the arieal attacks.
Can someone please help me orginaze my code to get the arieal attacks working.
My class:
http://lightning-1.com/Personal/Kingofnukes/Charclass.as
Coding on character
ActionScript Code:
// Set Key Up command to prevent false attacks //
onClipEvent (keyUp) {
//Remove "Double Slide Glitch"
if (slide=true && speedDecrease>1) {
walking = false;
dashing = false;
keyLeftTimer = 100;
keyLeftIsUp = false;
keyRightTimer = 100;
keyRightIsUp = false;
}
if (speed == 0) {
slide = false;
walking = false;
dashing = false;
gotoAndPlay("idle");
}
if (Key.isDown(Number(ord("S")))) {
attacking = true;
if (speed == 0) {
slide = false;
walking = false;
dashing = false;
gotoAndPlay("idle");
}
} else {
attacking = false;
if (Key.isDown(Key.RIGHT)) {
speed = 0;
slide = false;
} else if (Key.isDown(Key.LEFT)) {
speed = 0;
slide = false;
}
}
}
Thanx for any and all help:thumb:
My class was working fine untill i noticed when my MC's inside the Char MC weren't animating.
After noticing that, I rearanged my code to change the priority of action around to accmidate the nessicary attacks/actions.
I finnaly fixed them all myself excluding the arieal attacks.
Can someone please help me orginaze my code to get the arieal attacks working.
My class:
http://lightning-1.com/Personal/Kingofnukes/Charclass.as
Coding on character
ActionScript Code:
// Set Key Up command to prevent false attacks //
onClipEvent (keyUp) {
//Remove "Double Slide Glitch"
if (slide=true && speedDecrease>1) {
walking = false;
dashing = false;
keyLeftTimer = 100;
keyLeftIsUp = false;
keyRightTimer = 100;
keyRightIsUp = false;
}
if (speed == 0) {
slide = false;
walking = false;
dashing = false;
gotoAndPlay("idle");
}
if (Key.isDown(Number(ord("S")))) {
attacking = true;
if (speed == 0) {
slide = false;
walking = false;
dashing = false;
gotoAndPlay("idle");
}
} else {
attacking = false;
if (Key.isDown(Key.RIGHT)) {
speed = 0;
slide = false;
} else if (Key.isDown(Key.LEFT)) {
speed = 0;
slide = false;
}
}
}
Thanx for any and all help:thumb: