What would I type to make a 3 hit combo for a 2D platformer

Godot Version

Godot 4.5

Question

Hello, I've been trying to make a 2D action platformer so I've been watching various tutorials and I’m trying to script a simple 3 hit combo and I’m unsure what I would type to create one.

You can create a timer node and a boolean variable to control your combos inside the virtual / premade _input function or use if Input.is_action_just_pressed(“my_action_button”) in _process.

When the button is pressed, you can play your animation, start a timer, and change the boolean (can_combo) to true. If you press the action button again while can_combo is true, you can play a different animation and restart the timer. If you don’t press it before the timers timeout signal emits, set can_combo to false.

When you press the action button a final time, you can stop the timer, set can_combo to false, and play your final animation.

That’s about 50% of a combo system. You’ll need to implement some kind of check when you press the action button if you are currently combo-ing or not.

1 Like