ForumsProgramming ForumCombo help ??

9 3729
jimmy155
offline
jimmy155
39 posts
Nomad

How do i make it so, if my player ( hero) presses two keys at the same time, theres a combo, lets say he pressed y and u at the same time, the player does arial kick, how do i do it?
player instance: hero
http://www.newgrounds.com/dump/item/2613b8b8765a8e59d46e1262705738cf

  • 9 Replies
jimmy155
offline
jimmy155
39 posts
Nomad

anyone gonna help me?

Darkroot
offline
Darkroot
2,763 posts
Peasant

How does your normal key registrations/actions look like?

jimmy155
offline
jimmy155
39 posts
Nomad

why do you need that?

Darkroot
offline
Darkroot
2,763 posts
Peasant

Well first of all I don't know what actionscript version your using and second of all it's easier to help you if I know what I'm working with.

jimmy155
offline
jimmy155
39 posts
Nomad

im using actionscript 2.0 and about to keyony=1
do i change the 1 to the number key i want?

Darkroot
offline
Darkroot
2,763 posts
Peasant

Well you should know if you haven't been copy pasting. But yeah change it to a key.

LennonTheMage
offline
LennonTheMage
55 posts
Nomad

He pretty much wants it so that if two keys are released at the same time an action will play out, I'm not going to type out the exact code, but it would look something like this.


}
if(Key.isDown(key number)){
gotoAndStop(frame number){
}else{
if(Key.isDown(key number)){
if(crouch=true{
gotoAndStop(frame number){
(can use a 0 or 1 if you like number better)

Like I said that's not the exact code and I'm not in the editing window for actionscript(which helps me a lot) so there are probably a couple of errors in that code.

Btw: Like Darkroot said I have a feeling you've just been copying and pasting. Good games never come from copy and pasting, you can tell from just playing the game if the creator did that. Just a tip.

Showing 1-7 of 9