Help with Combo Please

Does anybody know how I can create a easy combo actionscript?
when I press spacebar I would like it to play frame 1, press again play frame 2 and so on. I apreciate the help thank you.

I apreciate the help but please post codes that work thank you.

^What is that, did you even try the code? Did you fiddle around with it a bit?


c = 0;
char.onEnterFrame = function() {
	if (Key.isDown(Key.SPACE)) {
		trace('First combo attack');
		c++;
		if (c>20) {
			c = 0;
		}
		if (c == 11) {
			c = 11;
		}
	}
	if (c<10 && Key.isDown(Key.SPACE)) {
		trace('second combo');
	}
};

Please, if you cant try around with some codes. Then you should search the forum.


c = 0;
h = 0;
space = false;
h.onEnterFrame = function() {
	if (count) {
		c++;
		if (c>20) {
			c = 0;
			count = false;
		}
	}
	if (Key.isDown(Key.SPACE) && !space) {
		space = true;
		trace('First combo attack');
		count = true;
	}
	if (c>5 && c<20 && Key.isDown(Key.CONTROL) && space) {
		if (h<1) {
			trace('second combo');
			h = 1;
		}
	}
	if (h>=1) {
		h++;
		if (h == 20) {
			h = 0;
			space = false;
		}
	}
};

Is this good enought for you or should I make the whole game?

calm down joppe…

i guess he wants the whole game…nutter