00:00
00:00
Newgrounds Background Image Theme

KouteiFK just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

AS: Basic Combo.

13,137 Views | 131 Replies
New Topic Respond to this Topic

Response to AS: Basic Combo. 2005-10-02 07:18:37


At 10/2/05 06:56 AM, -Paranoia- wrote: blah

Actually, I'm 12 :p
Age doesn't matter for making AS: topics as lon as you're not really young( 5 years old for example :)) and you have a decent knowledge of actionscript.

Learn maths, dude. <3

2005 - 1993 = 12 ;p


BBS Signature

Response to AS: Basic Combo. 2005-10-02 07:19:19


_currentframe isn't a function, it's a property (a read only property to be exact) which is exactly what it says.. the current frame of the target timeline. Anyway, not a bad tutorial.. should go into the specific effects/projects..


Sup, bitches :)

BBS Signature

Response to AS: Basic Combo. 2005-10-02 07:23:08


At 10/2/05 07:18 AM, -Toast- wrote:
At 10/2/05 06:56 AM, -Paranoia- wrote: blah
Learn maths, dude. <3
2005 - 1993 = 12 ;p

Ohh, I was looking at your age in the profile ^.^

Anyway it isn't 2005 - 1993. It is more like x - y where x = today and 1993> y <1994. My maths owns yours!


BBS Signature

Response to AS: Basic Combo. 2005-10-02 07:25:57


Of course I knew aobut _currentframe, I just never got round to using it. O.o

Don't argue about age, because that's caring about age, isn't it?


I'm back! on a temporary basis. No-one can remember who I am! but I don't really mind.

Response to AS: Basic Combo. 2005-10-02 07:35:06


Ninja chicken, remember you said it was pointless?
Well, people DO use combos after all...
Message from TheDeviousDuck:
RPG game now has 8 attacks, 6 spells, and 3 defnse moves...moving to combo attacks now


BBS Signature

Response to AS: Basic Combo. 2005-10-02 07:36:28


Thanks for the code, i guess it worked kinda well =)

(I changed it from mouse click to space bar)

The test

Thats just a quick test i made to make sure it works o_O... Press Spacebar to punch, then half way through that punch press space bar for next punch, then spacebar again for kick, and finally spacebar again for laser eyes.
- Requires good timing..
(I know, it sucks...)

Response to AS: Basic Combo. 2005-10-02 07:55:13


That reminds me that I forgot to post a sample.
I used that combo engine in that game (my new project).
W = walk foward.
S = walk backwards.
F = Block.
Left Mouse Button = Attack.
1 = Change to weapon number 1.
3 = Change to weapon number 3.
It's a bit buggy. Have fun :)

(Animations by MetalWarHead).


BBS Signature

Response to AS: Basic Combo. 2005-10-02 07:55:14


At 10/2/05 07:19 AM, -liam- wrote: _currentframe isn't a function, it's a property (a read only property to be exact) which is exactly what it says.. the current frame of the target timeline. Anyway, not a bad tutorial.. should go into the specific effects/projects..

Yeah read what I put in the last page I already pointed out it was a property
And Toast this is pointless the only people who need a tutorial on how to do something as important to there game as a combo system (or engine in most cases) are complete n00bs
And soon when msn stops fucking up ill post our convo and you can see toast getting into a little stress ;)


- Matt, Rustyarcade.com

Response to AS: Basic Combo. 2005-10-02 07:58:50


My msn isn't working neither.
Msn sucks today, first there's the offline problem, online people are shown as offline, and now this!

What convo are you talking about? I don't allow you to post any convo without my permission, it's against the rules.


BBS Signature

Response to AS: Basic Combo. 2005-10-02 08:03:20


At 10/2/05 07:58 AM, -Toast- wrote: My msn isn't working neither.
Msn sucks today, first there's the offline problem, online people are shown as offline, and now this!

What convo are you talking about? I don't allow you to post any convo without my permission, it's against the rules.

lol no its not and your not a mod so you cant make up rules
Its the one where you got all hot and bothered because I said you shouldnt make an AS thread and I didnt cuss or insult you once but you told me to die several times :P


- Matt, Rustyarcade.com

Response to AS: Basic Combo. 2005-10-02 08:07:23


1. You're off topic.

2. I was mad at you because I was busy.

3. If I wanted to post convos where you were angry/insulting, I can find dozens..


BBS Signature

Response to AS: Basic Combo. 2005-10-02 08:09:46


At 10/2/05 07:55 AM, Ninja-Chicken wrote: Yeah read what I put in the last page I already pointed out it was a property

So?

And Toast this is pointless the only people who need a tutorial on how to do something as important to there game as a combo system (or engine in most cases) are complete n00bs

What about people that want to learn how to make something like this for future reference? Seriously this is a good AS topic.

At 10/2/05 08:03 AM, Ninja-Chicken wrote: lol no its not and your not a mod so you cant make up rules

Actually it is.


Sup, bitches :)

BBS Signature

Response to AS: Basic Combo. 2005-10-02 08:13:57


At 10/2/05 08:09 AM, -liam- wrote:
And Toast this is pointless the only people who need a tutorial on how to do something as important to there game as a combo system (or engine in most cases) are complete n00bs

What do you know about it? Combo != Noob.

What about people that want to learn how to make something like this for
future reference?

Agreed.

Seriously this is a good AS topic.

<3

At 10/2/05 08:03 AM, Ninja-Chicken wrote: lol no its not and your not a mod so you cant make up rules
Actually it is.

Pwned :)

NC, why are you so mad at me lately?
You get pissed off by every good thing I manage to create...


BBS Signature

Response to AS: Basic Combo. 2005-10-02 08:58:45


lol toast stop being a big-head and just admit defeat
And you were not mad at me because you were busy because you initiated the conversation Ill post later when msn stops fucking up

Also Liam STFU your just as bad as toast if you think this will actually help people learn AS


- Matt, Rustyarcade.com

Response to AS: Basic Combo. 2005-10-02 09:07:20


At 10/2/05 08:58 AM, Ninja-Chicken wrote: lol toast stop being a big-head and just admit defeat

Defeat of what? All you've done in this thread is moan about how you bad it is.

Also Liam STFU your just as bad as toast if you think this will actually help people learn AS

Bad at what? And it will help people lean actionscript, look at all the people that didn't even know how to use _currentframe.. he's already helped them with that (_currentframe is practically VITAL in flash). You are such a "big-head", you think you're the best of the best.. you aren't at all. You're good, but thats it.. stop trying to show off in front of everybody because 75% of the time it just makes you look arrogant.


Sup, bitches :)

BBS Signature

Response to AS: Basic Combo. 2005-10-02 09:08:23


At 10/2/05 08:58 AM, Ninja-Chicken wrote: Ill post later when msn stops fucking up

You'll get banned...
I thought yesterday's ban would be enough...


Also Liam STFU your just as bad as toast if you think this will actually help people learn AS

What the heck is all that about? It DOES help people, people who for example didn't know the _currentframe thingy or just forgot about it.
Basically, YOU have to shut up and stop spamming my thread.


BBS Signature

Response to AS: Basic Combo. 2005-10-02 09:09:34


At 10/2/05 04:23 AM, -Toast- wrote: AS: Combo:

Okay here is the things that are wrong with this thread

AS: Main – Teh one to rule 'em all?

Knowledge needed:

Basic actionscript knowledge: gotoAndPlays,

there is only 1 gotoAndPlay function

if statements, onClipEvents,

You only need to know onEnterFrame

and preferably _currentframe function (Which will be explained anyways).

Its a property


Introduction:

:: The "_currentframe" funtion:

Again its a property

What is it?

This function basically allows you to detect on what frame an object is(Teh object's timeline).

No obviously it can only detect MovieClip objects currentFrame (or anything which extends the class) and so isnt just for any old object

It is extremely easy to use yet a very useful function that can save you quite a lot of time.
It is mainly used for attacks in games, for example:

WTF?

if(_currentframe == 1 && Key.isDown(Key.SPACE)){// && Means "and".

If I were you I would do
if ((condition1) && (condition2))

this.gotoAndPlay("Attack frame");/*"Attack frame" is a frame labled "Attack frame" with an animation of some guy attacking.*/
}

What is it used for?

Simple: to find out what frame an object is currently playing.

Example:
if(_currentframe == x){
//action
}

Maybe use this._currentframe to avoid confusion


Frame instances

To add an instance (name) to a frame, simply click the frame once and go to the propeties window. Then, type whatever you want in the textbox that should appear.
Then you can freely use gotoAndPlays or gotoAndStops using the name of the frame.

Frames dont have instance names they have labels

The combo engine. (Finally).

The code may depend on your animations, it can totally contain 4 como animations, but you can modify it to your likes. If you have any questions about how to modify it, feel free to ask.

So basically your spoon feeding n00bs code

1. You need to have four animations in four different movie clips, all set in different frames.
2. When you've put all the 4 animations into the MovieClip, make sure every animation has the amount of frames that it actually contains. (See picture below).
3. Name the first frame of every animation "combo1","combo2", etc...
4. Finally add this code:



onClipEvent(mouseDown){
if(this._currentframe == 1){ // if the frame number is "one".
this.gotoAndPlay("combo1");//Plays animation number 1.
}
if(this._currentframe > 20 && this._currentframe < 29){/* change those numbers to the frames from where the player can begin the 2nd animation to the last frame of it.*/
this.gotoAndPlay("combo2");// Plays animation number 2.
}
if(this._currentframe > 33 && this._currentframe < 43){/* change those numbers to the frames from where the player can begin the 3rd animation to the last frame of it.*/
this.gotoAndPlay("combo3");// Plays animation number 3.
}
if(this._currentframe > 45 && this._currentframe < 54){/* change those numbers to the frames from where the player can begin the 4th animation to the last frame of it.*/
this.gotoAndPlay("combo4");// Plays animation number 4.
}
}

I hopr I have been clear enough, don't hesitate to e-mail me if you're having any problems.

Good luck :)

I have read all that exactly but surely it would play all the animations on just pressing the mouse once because you didnt do a gotoAndPlay (1) in the frames. Also I woud have had 4 frames with gotoAndStop for all the combos and when the animation inside the frame reaches its peak you gotoAndStop (1) or its parent. It would have been much easier because the frame number would be the combo number so you wouldnt need to find all those gay numbers like in yours and also no frame labels PLUS much more expandable so you can have huge chains of different combos triggered with different buttons

Anyways this is why toast you shouldnt be making AS:Threads because you only just figured out how to do this yourslef and you dont offer a deep enough explanation or other techniques


- Matt, Rustyarcade.com

Response to AS: Basic Combo. 2005-10-02 09:11:57


At 10/2/05 09:07 AM, -liam- wrote: Defensive stuff

Liam stop defending your follower and stop saying that I said im the best at AS because I have never said that once EVER and if you can prove otherwise I welcome you
Liam you are very arrogant
Im not replying because you 2 are being very defensive about a bit of constructive critisism and you both need to grow up and accept that your not perfect


- Matt, Rustyarcade.com

Response to AS: Basic Combo. 2005-10-02 09:13:44


At 10/2/05 09:09 AM, Ninja-Chicken wrote: No obviously it can only detect MovieClip objects currentFrame (or anything which extends the class) and so isnt just for any old object

It can also detect the _root frame, so basically it can detect what frame any TIMELINE is on. Not MC or object.

If I were you I would do
if ((condition1) && (condition2))

Why? It makes no difference at all.

Maybe use this._currentframe to avoid confusion

Again you're just being petty, that makes no difference because _currentframe refers to the this object/symbol/timeline.


Sup, bitches :)

BBS Signature

Response to AS: Basic Combo. 2005-10-02 09:15:47


At 10/2/05 09:11 AM, Ninja-Chicken wrote: stop saying that I said im the best at AS because I have never said that once EVER and if you can prove otherwise I welcome you

Yesterday you insulted Glaiel because he didn't understand two things, and you said you were better than him because you knew more than he did in less time.

Liam you are very arrogant

Me? In what way?

Im not replying because you 2 are being very defensive about a bit of constructive critisism and you both need to grow up and accept that your not perfect

Constructive critisism is not telling someone they suck.


Sup, bitches :)

BBS Signature

Response to AS: Basic Combo. 2005-10-02 09:17:22


At 10/2/05 09:09 AM, Ninja-Chicken wrote:
At 10/2/05 04:23 AM, -Toast- wrote: AS: Combo:
Okay here is the things that are wrong with this thread

75% of them aren't wrong at all.


AS: Main – Teh one to rule 'em all?

Knowledge needed:

Basic actionscript knowledge: gotoAndPlays,
there is only 1 gotoAndPlay function

No, there are 4. Even if there was one, it is still needed.

if statements, onClipEvents,
You only need to know onEnterFrame

Nope.. if statements are also required...


and preferably _currentframe function (Which will be explained anyways).
Its a property


Introduction:
The "_currentframe" funtion:
Again its a property

It doesn't matter that much. property or function, it's good for AS.


What is it?

This function basically allows you to detect on what frame an object is(Teh object's timeline).
No obviously it can only detect MovieClip objects currentFrame (or anything which extends the class) and so isnt just for any old object

What about the _root.? A _root. timeline isn't a movie clip, right?

It is extremely easy to use yet a very useful function that can save you quite a lot of time.
It is mainly used for attacks in games, for example:
WTF?

if(_currentframe == 1 && Key.isDown(Key.SPACE)){// && Means "and".
If I were you I would do
if ((condition1) && (condition2))

It doesn't change anything.


this.gotoAndPlay("Attack frame");/*"Attack frame" is a frame labled "Attack frame" with an animation of some guy attacking.*/
}

What is it used for?

Simple: to find out what frame an object is currently playing.

Example:
if(_currentframe == x){
//action
}
Maybe use this._currentframe to avoid confusion

Dude, it isn't confusing...



Frame instances

To add an instance (name) to a frame, simply click the frame once and go to the propeties window. Then, type whatever you want in the textbox that should appear.
Then you can freely use gotoAndPlays or gotoAndStops using the name of the frame.
Frames dont have instance names they have labels

I didn't say instance names, I either said "names" or "instances".

The combo engine. (Finally).

The code may depend on your animations, it can totally contain 4 como animations, but you can modify it to your likes. If you have any questions about how to modify it, feel free to ask.
So basically your spoon feeding n00bs code

What the heck is wrong with you? Criticizing it means you'd like to delete teh code part, wtf? This is the essential part of a AS:


1. You need to have four animations in four different movie clips, all set in different frames.
2. When you've put all the 4 animations into the MovieClip, make sure every animation has the amount of frames that it actually contains. (See picture below).
3. Name the first frame of every animation "combo1","combo2", etc...
4. Finally add this code:



onClipEvent(mouseDown){
if(this._currentframe == 1){ // if the frame number is "one".
this.gotoAndPlay("combo1");//Plays animation number 1.
}
if(this._currentframe > 20 && this._currentframe < 29){/* change those numbers to the frames from where the player can begin the 2nd animation to the last frame of it.*/
this.gotoAndPlay("combo2");// Plays animation number 2.
}
if(this._currentframe > 33 && this._currentframe < 43){/* change those numbers to the frames from where the player can begin the 3rd animation to the last frame of it.*/
this.gotoAndPlay("combo3");// Plays animation number 3.
}
if(this._currentframe > 45 && this._currentframe < 54){/* change those numbers to the frames from where the player can begin the 4th animation to the last frame of it.*/
this.gotoAndPlay("combo4");// Plays animation number 4.
}
}

I hopr I have been clear enough, don't hesitate to e-mail me if you're having any problems.

Good luck :)

Anyways this is why toast you shouldnt be making AS:Threads because you only just figured out how to do this yourslef and you dont offer a deep enough explanation or other techniques
Yeah, right, the explanation was good, so shut up.


BBS Signature

Response to AS: Basic Combo. 2005-10-02 09:22:31


At 10/2/05 09:21 AM, SpamBurger wrote: I was born August 7, 1993.

Heh, you're off topic + off page 2 :P


BBS Signature

Response to AS: Basic Combo. 2005-10-02 09:36:39


Damn, I'm the oldest of the 12 years olds :P


BBS Signature

Response to AS: Basic Combo. 2005-10-02 10:17:28


Yeah being young is an acheivement :P


- Matt, Rustyarcade.com

Response to AS: Basic Combo. 2005-10-02 10:22:28


At 10/2/05 09:38 AM, SpamBurger wrote:
At 10/2/05 09:36 AM, -Toast- wrote: Damn, I'm the oldest of the 12 years olds :P
And Im the youngest! Oh yea!

And i'm in the middle!

Response to AS: Basic Combo. 2005-10-02 10:24:46


At 10/2/05 10:22 AM, _Nick_ wrote:
At 10/2/05 09:38 AM, SpamBurger wrote:
At 10/2/05 09:36 AM, -Toast- wrote: Damn, I'm the oldest of the 12 years olds :P
And Im the youngest! Oh yea!
And i'm in the middle!

Yey. :)
Seriously though, it's really off topic...


BBS Signature

Response to AS: Basic Combo. 2005-10-02 10:27:54


At 10/2/05 10:24 AM, -Toast- wrote:
At 10/2/05 10:22 AM, _Nick_ wrote:
At 10/2/05 09:38 AM, SpamBurger wrote:
At 10/2/05 09:36 AM, -Toast- wrote: Damn, I'm the oldest of the 12 years olds :P
And Im the youngest! Oh yea!
And i'm in the middle!
Yey. :)
Seriously though, it's really off topic...

Okay Ill help get back on topic...

Toast can you help me with combos what do I do if I want combos done with the keyboard


- Matt, Rustyarcade.com

Response to AS: Basic Combo. 2005-10-02 10:30:22


At 10/2/05 10:27 AM, Ninja-Chicken wrote: Okay Ill help get back on topic...

Uhh... Okay :P

Toast can you help me with combos what do I do if I want combos done with the keyboard

LOL, I wasn't expecting THAT! :P

Oh well, I'll "get it back" aswell.. :P

Just change

onClipEvent(mouseDown){
//action
}

to
onClipEvent(keyDown){
if(getCode(<enter a number here>)){
//action
}
}


BBS Signature

Response to AS: Basic Combo. 2005-10-02 10:32:56


At 10/2/05 10:30 AM, -Toast- wrote:
At 10/2/05 10:27 AM, Ninja-Chicken wrote: Okay Ill help get back on topic...
Uhh... Okay :P
Toast can you help me with combos what do I do if I want combos done with the keyboard
LOL, I wasn't expecting THAT! :P

Oh well, I'll "get it back" aswell.. :P

Just change

onClipEvent(mouseDown){
//action
}
to
onClipEvent(keyDown){
if(getCode(<enter a number here>)){
//action
}
}

aha but what if I want different keys to do differen things
for example A = punch
S = kick and I want different combos like

AAA does a punch then an uppercut then a hammer
ASA does a punch then backflip kick then a flying punch

also I made an example of your combo system to show people

http://img307.images..image=comboas6td.swf


- Matt, Rustyarcade.com

Response to AS: Basic Combo. 2005-10-02 10:37:42


At 10/2/05 10:32 AM, Ninja-Chicken wrote: I made an example of your combo system to show people

http://img307.images..image=comboas6td.swf

It's the one I sent you in msn, right?
Can you please decompile it and send me the fla? I have lost that staff (Accidently deleted :P)


BBS Signature