Problem with combo system

Get help using Construct 2

Post » Thu Apr 02, 2015 1:01 am

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!
Posts: 4
Reputation: 333

Post » Fri Apr 03, 2015 4:47 pm

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.
Posts: 876
Reputation: 5,650

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests