@kurtisblack9271

I have a different way of doing it:
Each attack is a different state in my game, and only certain states can transition to the basic attack (Since basic attack can't transition to basic attack, that addresses your need for a timer). There's a bool that starts as false and is set to true after the attack hits. If the bool is true, and the state has a follow-up attack, pressing the button in this window (before the state ends and transfers back to idle/move), pressing the attack button transitions to the follow-up. The combo chain can run as long as each attack has a follow-up, and transitioning from the last attack back to the first one for a (potentially) infinite combo is perfectly valid.

@LucidumLife

I like to make the game fps slow down when you're hitting with a strong attack like when you do the last attack of your combo, makes you feel like you're performing a strong attack on the enemy.

@milo4885

I've been watching your shorts lately and I gotta say this is some of the BEST game dev content on youtube - simple, short and easy to digest - as it should be!! I can't express enough how much I appreciate these!!

@mumia2176

A good tip would be to buffer the input, that way people wont be frustrated that they pressed the button but the attack didnt happen. Pretty standard tip but hey, good to keep in mind

@thomascampbell4535

Wishlisted Isadora’s Edge yesterday, I have high hopes for this! Cant wait to see all the little details I wouldn’t notice without these videos!

@Radish-000

Another way to do this is using a method track in your animation player, and setting a boolean value through there to "enable" the follow-up. Allows for a lot of precision and doesn't bloat the scene tree as much in my opinion.

@blackpanda418

Side bar the pixel art is so beautiful

@m4riel

One cool example of this is one of the basic sword combos in the DMC 2013. If you just mash the light attack button repeatedly, you get a combo. But, if you delay the transition from the second attack to the third by a little bit, you get a different combo

@noko389

This game has changed so much

@crimsonguitarist

In Godot, you could get around using timers entirely by using a function call track in the animation player. You would set up a function like "enable_combo_attack()", add logic that would enable detection of the attack input for combos, then call that function in each attack animation through a function call track by calling your previously created function. That way, you can control down to the frame of the animation when you can cancel, and if you get hit in the middle of your attack you don't have to worry about stopping timers from running in the background.

@ugn154

Love, respect and support for indie game developers!
You will all be the reason true gaming lives on.

@narashi2744

I am still proud that I've "invented" this mechanic when i was 10 and fiddling around in the studio without knowing it already exists and the majority of games uses it 😂

@RaydenSavage

To expand on combo timers, I've played games that have multiple combo timers attached to attack sets. Most fighting games have this aspect in them. 

Say a light combo has 5 attacks in it that are hit in quick succession. Well you could for example put a slightly longer combo timer after the third attack that then chains into a seperate multi-hit combo.

Doing this outside of fighting games is usually done in move upgrades, such as DMC or God of War.

@bluemysticaltree

I thing I love seeing in games is that you have less recovery time when you hit an attack.
It's used mostly in fighting games where combos are really needed but in hollow knight it also has that where you can attack earlier if you land an attack

@MH-lr6ue

These shorts make videogame design sound fun. I know how to create 2 timers in Godot. Gonna practice this soon!

@VasishthaSookraj

Did this exact thing when I was working on a group project (3rd-person monster fighter battle royale) and it worked pretty well! It did get pretty messy (accounting for the switching to the second attack animation and then going to the third, or setting back to the first if the combo was over), but that’s mainly cause I had way worse naming conventions (like they were so, so unnecessarily long and detailed). That and there were various monsters with different timings, so it got a bit messy organizing stuff. Though after fine-tuning and consolidating a lot of code, it was pretty clean and super effective. Oh yeah, awesome video btw!

@loganb2198

I think the cleanest way to this is with states. Each attack is a state and speicific attacks can transition into other ones. You can use the animation end event to signal the transitions. No timers needed, more efficient.

@Mlkdoketchup

While I was watching I thought of a way to make combo:
Create a combo variable and a combo_final variable
When the player press the attack button, he'll do the first attack and the combo_final is set to 1 and when the first attack animation end the combo adds 1 and the timer starts, when it ends, both combo_final and combo are set to 0. If you press the attack again during the attack animation or before the cooldown ends, the combo_final is set to 2, and when the first attack animation ends, it starts the second attack animation. With that, I hope you all understand it

@Gnarlak

I really like these simple explanations they are really cool

@_Mythic777_

I definitely need to watch more of your videos! I want to make an RPG eventually and this is an interesting and engaging way to start on that path so thank you! You’ve earned my sub 😁