PDA

View Full Version : need help with platform code



rsugar
July 3rd, 2005, 01:26 AM
if (air == false && !Key.isDown(Key.LEFT) && !Key.isDown(65) && _currentframe <4 or air == false && !Key.isDown(Key.RIGHT) && !Key.isDown(65) && _currentframe <4 or air == false && !Key.isDown(Key.CONTROL) && !Key.isDown(65) && _currentframe <4){
state = 1;
}
if (Key.isDown(Key.LEFT) && air == false && !Key.isDown(65) && _currentframe <4 or Key.isDown(Key.RIGHT) && air == false && !Key.isDown(65) && _currentframe <4) {
state = 2;
}
if (Key.isDown(Key.CONTROL) && air == false && !Key.isDown(65) && _currentframe <4){
state = 4;
}
if (!Key.isDown(65)) {
gotoAndStop(state);
}



This is my code for changing the stance or state of my player.
However, When I want him to attack, he goes into an infinite attack loop(attack is state 4) How can I fix this?

rsugar
July 4th, 2005, 02:53 PM
ahem,
BUMP