system of combos ?

Discussion and feedback on Construct 2

Post » Wed Aug 02, 2017 1:29 pm

Hello someone some tips on how to create a system of combos with a same button eg "X" three attack squeeze
B
15
S
2
Posts: 1
Reputation: 679

Post » Wed Aug 02, 2017 2:06 pm

decide on your combo timeout i.e. 1 or 2 seconds or whatever: global variable: combotimeout = 2
make another global variable for stepping the combo up each time: combostep = 0
add your conditions for the combo starting , such as weapon collision with enemy. increase the combostep by 1 for each collision.
your sprite can optionally change animations based on the combostep variable. for testing/ visual cue you can create a text box with fade behaviour with the combostep value in the text field at the enemy x,y so you can see the combo amount increase with each hit.
each second, subtract one from combotimer, and if combotimer = 0, reset combostep to = 0

so your attack button will trigger all of this because it is based on the collision between your weapon and the enemy.
consider also a condition that tests if your sprite is attacking so that merely touching the enemy with your weapon without attacking doesn't register a hit.
B
4
Posts: 8
Reputation: 277


Return to Construct 2 General

Who is online

Users browsing this forum: Artpunk, jobel and 4 guests