How to create a simple input buffer/queue?

Hey guys, I’ve been trying to find a way to make a simple input buffer/queue but most solutions I’ve come across seem a little too complex for what I’m doing.

I’m looking to develop a system in blueprints where the inputs issued during an action would be saved until the current action is completed.

Example: If I press Q>W>E, I’d be locked in to Q’s animation until W can be cast, then W would be cast and then E and so on.

If anyone could share a simple solution or at least point me in a direction I’d really appreciate it.

Thanks in advance

I would use an Array of type FName here to store the names of input action mappings in. When input mapping “CastSpell” is pressed, you push the name “CastSpell” into the array and so on. When the current action finishes, you check for the next name in the array, remove that name, then perform the action. Then the cycle continues until the array is empty.

2 Likes

Thanks for the answer, I was able to get it working!