How to make an Input Queue system

I want to set up a queue system where for example I press the dodge button and a attack button, then immediately after the dodge is complete the attack animation plays, how could I make something like this?

Hey there @Faze_Kaas! So it sounds like you’re looking for an input buffering system! From a high level, input buffering systems are basically just arrays of inputs put together with conditions on what has priority or not to come out and when they should fall off. Most of these systems are FIFO (first in first out) while processing sometimes depending on the type of game. This tutorial I have on hand is geared more towards a fighting game input buffering system but it follows the same logic as if you would for buffered inputs in general with a bit more processing (for combos).

Here’s a video that helps you set up a basic implementation, and he also has a followup video on the matter as well. You’ll have to modify this a bit depending on your use case, but it should show you a solid way to get started on this mechanism!

Disclaimer: Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

Hi, thanks for the reply

but im more looking for something like what they did in mortal shell:
Behind The Scenes of Mortal Shell | Inside Unreal - YouTube at 1:42:00

Hmmmm, an anim notify based system sounds perfect. That said, I don’t think there are too many better resources than that video itself, artifacting aside I think the overview is pretty good. Another good example would be the ability input queue system in the Gameplay Ability System plugin is a solid example as well, but not really animation notify state based.

Yeah, I tried to make a input queue system myself using anim notify’s and booleans, but the problem was that it would take a lot of time/code if I wanted to add another animation that was able to queue + queueing the same button wouldnt work. (if I press right mouse button, I could queue left mouse button but not right mouse button etc.)
Do you perhaps know a video that goes over the Gameplay Ability System input queue system? I couldnt find one.

Thanks

Sorry about that! GAS has limited documentation and even external resources are a bit slim. I’ve only touched on it a bit myself. I’d still recommend trying to improve upon what you had with the animnotify and boolean system. Might be able to pack an array of key presses and roll through them to look for which would have priority execution?

I believe the guided tour went over it ever so slightly when they were doing the melee combat, but definitely not enough to work from:

Thank you for the link, I will try to improve what I made and see how that goes, Thanks for the help!

1 Like

I made a input queue system myself that works great now, thanks :slight_smile:

2 Likes

How exactly?