A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [help]Combo Recognition

  1. #1
    Meat Popsicle stevz©_'s Avatar
    Join Date
    Mar 2001
    Posts
    108

    [help]Combo Recognition

    Hey there!

    I have a character who can perform 6 different moves. With these moves you could perform a particular combo which can start from 2 hits to 15 hits. I've already got the combo names ready but have hit another wall... How would I go about putting this into practice?

    I would've thought an if statement checking if an array equaled a set combo, tested it and got negative results. I was hoping I'd get some Idea rather than making a huge list of ifs together and lag the game even more than it already is.

    Ty for listening...

    Stevz!

  2. #2
    n00b LeechmasterB's Avatar
    Join Date
    May 2004
    Location
    Switzerland
    Posts
    1,067
    Just use a string as buffer and add each pressed key to it and search it for combos... pretty simple to do actually.

    A key should have 3 states, released, pressed and toggled/held down. If a key is helddown it shouldnt give another input but be recognized.
    Last edited by LeechmasterB; 03-29-2007 at 11:23 AM.
    I do stuff that does stuff...

    J-Force

  3. #3
    Meat Popsicle stevz©_'s Avatar
    Join Date
    Mar 2001
    Posts
    108
    Quote Originally Posted by LeechmasterB
    Just use a string as buffer and add each pressed key to it and search it for combos... pretty simple to do actually.

    A key should have 3 states, released, pressed and toggled/held down. If a key is helddown it shouldnt give another input but be recognized.
    Guah! The vagueness in the OP is horrendous. Forgive me.

    Nevertheless, TY LeechmasterB. You sparked it and I do think it'll work.

  4. #4
    FK founder & general loiterer Flashkit's Avatar
    Join Date
    Feb 2000
    Location
    Sydney
    Posts
    1,149
    I had this in one of my flash folders, cant remember where I got it but I thought about using it on one of my projects, I dont even know if it works but it allows you to listen for key combinations supposedly
    Attached Files Attached Files
    Regards Mark Fennell - Flash Kit Founder, general loiterer
    -------------------------------
    I Hate Zombies - iPhone Game | markfennell.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center