Problem with combo system

0 favourites
  • 2 posts
From the Asset Store
Combo
$10 USD
Button Combinations like in fightings, supports both keyboard and gamepads
  • Hi there! I'm having problems with my game, the game is a runner, but I need to make when the player colliding with an enemy stops time and have a certain time to execute a combo system time.

    What I have is an array with randomly generated numbers. Each number means a special key (up, down, left, right). The combo appears on the screen, but what I need is to read the key pressed by the player and see if he did well.

    Something like "one finger death punch" combos.

    Thanks for your help!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Combo appears on screen, set a variable Combo = 1

    When Combo = 1, do the following

    set variable combo_timer = 0

    set array_current_index to 0

    1) Increase a combo_timer (timeout is 1 second or however fast you want the player to be able to react)

    2) If player presses key, check that key with the combo_array(array_current index) to see if it matches..

    3) If it matches, reset combo_timer and increase the array_current_index and repeat back to 1)

    4) If it doesn't match or the combo_timer expires, then set a fail (kill the player? or whatever you have planned for a fail).. remember to set Combo=0

    5) If array_current_index > number_of_combo_moves, then player has succeeded.. set Combo = 0

    Hope that makes sense.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)