hello, i’'m working on a hack & slash game and currently almost close to finish the character actions(attack, jump, crouch, walk, run), then currently i’m stuck on combo part, i means when you press the buttom more than 1 time he start to make different attack in a chain.
while i’ve already made the "chain attack, the thing i’m currently stuck is about how to make 2 conditions on how to "trigger this chain:
1 - he only goes “combo” if his “hitting something”: like the enemie if you are just “pressing the buttom” the character will just play the “first attack” all times and only goes "combo if he hit something with the attack
2 - if the character press the attack buttom then 'take a little time before press again the attack buttom it will “reset” the combo and the character will do again the first attack, let’s say if i keep pressing the buttom then the character will go combo normal, however if i press the buttom then let’s say take more than 1 sec to press again then he goes back again to do the first attack instead of keep the combo.
here my combo node:
this allow me to “chain combo” however i’m stucked because it’s Aways" do the combo, i means even if for exemple i click one time the buttom then start to move around and do others things if later i press again the buttom it don’t go back do the first attack but it do the “second” then the third, only after i’ve did the “full chain” which it’s “reset”, i want to be able to reset if the player take too much time to "click again and or it’s only trigger the chain if the character hit something and only keep chain as long he is hitting something and don’t take too much time to press the buttom, like if him hit the target one time then press the buttom again fast it go the second attack but if the character take “too much time to press again it will reset back to the first attack no matter on what attack number it is (it’s aways will reset the attack count to 0 after x times passed if the character don’t hit anything or take too much time to press the buttom”.
those are my question, how to reset the attack count back to 0 if: 1- the character take too much time to press the buttom; 2 - if it take too much time to hit something or is not hitting anything, just clicking the buttom without hit anything.
the basic idea is if the player is just pressing the buttom without hit anything it will just keep doing the first attack forever, then only after it hit a “enemy” which it can trigger the chain which will happens if the player press the buttom fast enough otherwise if him dont press fast it will just reset back to the first attack and keep doing the first attack without go chain until him start to actually hit it fast enough to keep the chain.
Another thing which i would like to know is how to after the “last blow from the chain”, send the enemie "go away, i means after he take the last strong blow or any special blow with this type of power, it knock far away the enemie from the player, how to do that and how to control the distance/lenght the enemie will be throwed away.