Godot Version
4.7.stable
Question
Hi, I found myself at the necessity of creating an input buffer system for a hack and slash combo system (different input order of light and heavy attacks do different things), but I haven’t found any solid documentation on it. All youtube shows me when I search for “godot input buffer” is a lot of people using a timer node to detect if the player pressed jump x time before hitting the ground.
I found this post which mentions a ring buffer, but I don’t quite get it? I also don’t know if this would be the correct approach for what I’m trying to do.
I usually have an idea of what the code of what I’m trying to do will look like, but this time I’m completely blind to what the solution would be, hence this very forum post.
All I need is a way to process input like light attack and heavy attack in different orders, but with loose time to it, in a buffer. Like, pressing L L L H before the first attack comes out, should be a valid input for the combo to trigger, which could be done in an array, but how do I disconsider what input comes after that? What data format should I use for storing the individual inputs in an array? How do I allow for animation canceling, even when the input queue is filled already? I’m just at a blank here ;u;
I hope my very confusing and convoluted explanation of my problem can suffice for someone to help me here ;u;
I’m not the best at explaining things, sorry, I tried my best.
Thanks in advance, just reading this text is a lot.




