Lorithon
04-21-2009, 08:30 PM
Hey Guys here's something a little different
remember that guy in my previous post well i'm still working on him
my new problem is that when the guy is standing still i can get it so that when he has moved to the left, he stands still facing the left and visa versa
however whenever he is standing still and attks with his bat he always swings to the right because tha's what i told him to do that on that frame
how can i make it so that when he is standing still and facing Left he attks Left
Here's what i have so far
standStill.onEnterFrame = function() {
if(Key.isDown(68)) {
this._x+=4;
this.gotoAndPlay(3);
}
//Moves Right
else if(Key.isDown(65)) {
this._x-=4;
this.gotoAndPlay(14);
}
//Moves Left
else if(Key.isDown(1)) {
this.gotoAndPlay(25);
}
//attks Right while standing still
else if(Key.isDown(1) && Key.isDown(68)) {
this._x+=4;
this.gotoAndPlay(40);
}
//Moves right while attking Right (not working)
else if(Key.isDown(1) && Key.isDown(65)) {
this._x-=4;
this.gotoAndPlay(55);}
//Moves Left while attking Left (Also not working)
}
P.S ---- rrh how do i make it so that a & b are true so he can move while attking???:confused:
remember that guy in my previous post well i'm still working on him
my new problem is that when the guy is standing still i can get it so that when he has moved to the left, he stands still facing the left and visa versa
however whenever he is standing still and attks with his bat he always swings to the right because tha's what i told him to do that on that frame
how can i make it so that when he is standing still and facing Left he attks Left
Here's what i have so far
standStill.onEnterFrame = function() {
if(Key.isDown(68)) {
this._x+=4;
this.gotoAndPlay(3);
}
//Moves Right
else if(Key.isDown(65)) {
this._x-=4;
this.gotoAndPlay(14);
}
//Moves Left
else if(Key.isDown(1)) {
this.gotoAndPlay(25);
}
//attks Right while standing still
else if(Key.isDown(1) && Key.isDown(68)) {
this._x+=4;
this.gotoAndPlay(40);
}
//Moves right while attking Right (not working)
else if(Key.isDown(1) && Key.isDown(65)) {
this._x-=4;
this.gotoAndPlay(55);}
//Moves Left while attking Left (Also not working)
}
P.S ---- rrh how do i make it so that a & b are true so he can move while attking???:confused: