# Help with Combo Please

**URL:** <https://forum.kirupa.com/t/help-with-combo-please/187590>\
**Category:** programming\
**Created:** [April 30, 2006, 8:11pm UTC](https://forum.kirupa.com/t/help-with-combo-please/187590 "2006-04-30T20:11:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sammi](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@sammi](https://forum.kirupa.com/u/sammi)\
**Post date:** [April 30, 2006, 8:11pm UTC](https://forum.kirupa.com/t/help-with-combo-please/187590/1 "2006-04-30T20:11:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sammi](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@sammi](https://forum.kirupa.com/u/sammi)\
**Post date:** [May 1, 2006, 7:46am UTC](https://forum.kirupa.com/t/help-with-combo-please/187590/2 "2006-05-01T07:46:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Joppe](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@Joppe](https://forum.kirupa.com/u/Joppe)\
**Post date:** [May 1, 2006, 8:37am UTC](https://forum.kirupa.com/t/help-with-combo-please/187590/3 "2006-05-01T08:37:47Z")

</div>

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

```auto

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.

---

<div class="post-metadata">

**Author:** ![Joppe](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@Joppe](https://forum.kirupa.com/u/Joppe)\
**Post date:** [May 1, 2006, 8:48am UTC](https://forum.kirupa.com/t/help-with-combo-please/187590/4 "2006-05-01T08:48:32Z")

</div>

```auto

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?

---

<div class="post-metadata">

**Author:** ![KIERIOSHIMOTO](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@KIERIOSHIMOTO](https://forum.kirupa.com/u/KIERIOSHIMOTO)\
**Post date:** [May 1, 2006, 9:03am UTC](https://forum.kirupa.com/t/help-with-combo-please/187590/5 "2006-05-01T09:03:00Z")

</div>

calm down joppe…

---

<div class="post-metadata">

**Author:** ![InfestedDemon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/infesteddemon/32/1871_2.png) [@InfestedDemon](https://forum.kirupa.com/u/InfestedDemon)\
**Post date:** [May 1, 2006, 9:13am UTC](https://forum.kirupa.com/t/help-with-combo-please/187590/6 "2006-05-01T09:13:38Z")

</div>

i guess he wants the whole game…nutter
