[FREE] Input Buffering plug-in for Unreal Engine 4

I am busy with relocation currently so I don’t have time to look into your issue very soon.

I have tried to use two gamepads for player 1 and 2 in my personal project of fighting game. It worked and I didn’t have to do something special. UE4 would use keyboard and first gamepad for player 1, and second gamepad for player 2.

What I would suggest you is make sure you can use two gamepads for player 1 and 2, respectively, without my plug-in. And then try to find a way to use first gamepad for player 2 instead of player 1, without the plug-in. If you can do that, finally try to apply the method with the plug-in.

What you were trying to do is not currently supported in UE4. You cannot make UE4 wire up keyboard for player 1 but first game controller for player 2 without modifying the engine. So basically it’s nothing to do with my plug-in. You have to find a solution to do that first and then I can help you with remaining issues you have specific to the plug-in.

There is something called *ControllerId *in the engine and it determines which game controller a local player uses. You can wire up the second controller for player 1 and the first controller for player 2 by setting *ControllerId *but keyboard is always bound to the local player with *ControllerId *of zero. Besides, this functionality is not available in Blueprint.

I’ve already done it, it is working with Player 1 using Keyboard, and Player 2 using Gamepad. It’s a tutorial made by Unreal Engine to do so, but I suppose I can just rework my system to offer two controllers, and come back once I’m complete. Although I’ve temporarily abandoned the project.

I’m glad to know you’ve already found a solution. Then you should’ve known there’s nothing to do with my plug-in to achieve that.

@jwyuen

Hello jwyuen, I’ve made a video for your question. Hope you enjoy it.

@Isatin
Hi Isatin ! Your plugin is great ! I’m using it on prototype of my action hack’n’slash game. I have two questions.

  1. How to work with key mappings ? I got action input “WeaponAttack” in project settings and I want Input Buffer to listen key form this action input not hard coded keys on my controller. It’s for key remapping with Rama Victory plugin.
  2. How to make charge attack where player needs to hold button to charge attack and after release it performs charged attack ? Like you see similar things in gmaes like Bayonetta or Nier Automata and many others.

I’m glad to know you like the plug-in.

  1. If you need dynamic key mappings, you can change the key mappings of Input Buffer via Blueprint or C++, and call *Initialize *function after you change them. I neither heard about the plug-in you mentioned nor know how it works, so unfortunately I can’t provide information about how to use it with mine.

My plug-in supports *held *type of input which is not provided by the build-in input action system, so it has to work independently. *Held *type is essential for fighting games to input commands such as Quarter-Circle-Forward, so no reason to give it up.

  1. If the case you were talking about requires two buttons, you may refer to this tutorial video. If it just needs holding one button, you can create input events of *released *type to detect when you let go.

Moreover, if you want to trigger different actions according to how long you hold the button, you can use both *held *and *released *type in your Input Commands to do that. Watch the video or read Time Limits section in the document, if you need some information. When using more than one type of input events triggered by the same keys, sometimes you may have to add one of them to Events To Ignore or your Input Commands may never have a chance to be matched.

Thanks for answer ! But I still don’t know how to change keys in Event Setups at runtime. I can’t find nodes in Blueprints that allows me to update Event Setups. Pls help

EDIT: I couldn’t find nodes because I got old version and I have to update to the newest version of your plugin xD Stupid me… xD

@Isatin

I have a question about the “moves” variable, which contains animation montages.
Could this variable be switched out for user specified variable type?

I ask because I’m using the Able Ability System, which utilizes an “ability” variable type.
And it would be nice if I could use this to trigger abilities this way.

Surely you can do that. My plug-in is all about input. What you want to do after a command is input is up to you. My tutorial is just to show you a simple way to use the plug-in. It may neither the best way nor the fittest one for your projects. Keep in mind you should learn from the tutorial and create your own approach rather than just copy it.

If you want to replace AnimMontages with Abilities, you should also replace all nodes using AnimMontages. If you don’t want input buffering, you can remove nodes related to that from the tutorial. Otherwise, you have to come up with a new method to check buffered input if the one from tutorial is not suitable.

Thank you!

And since we’re talking about it

I have another question regarding input buffering:

How do we make inputs “wait to execute”?
What I mean is, make the system “log” the input, but don’t execute the command until some “gameplay related” opportunity is available?

An example of this is Street Fighter’s “wake up Shoryuken” aka “wake up DP”.
In Street Fighter IV, players could log the D,F,DF+P command while their character was still knocked down, and the game would hold on to that command in memory, and wait to execute it when the “character” wakes up.

I guess, “delay execution until [condition] is met” is what I’m looking for.

You’ve almost understood how it works, but technically you’d better buffer input instead commands.

Abstractly, what I did in my tutorial is:

  1. When input events are triggered, store them in a buffer.
  2. Check the buffer against a command list to see if any matches.
  3. If found, try to execute the first matching command and clear the buffer. If it is not allowed for some reasons (i.e. another command is being processed), do nothing to the buffer.
  4. Once it’s free to process commands (i.e. a command is just finished), check buffered input by doing step 2 and 3.

So if you want to replace AnimMontages, you should think about how to do step 3 and 4.

Ok great, now this part specifically:

What would this look like if the condition was to check for was a bool for a “cooldown”?
Or if the condition was a check for an “AnimNotifystate”?

Would you be able to screenshot an example of what that should look like?

Check the third tutorial video “How to make a combo”. The equivalent function is *IsIdle *on ExampleCharacter. Surely you have to replace this function with yours if you want to use other assets instead of AnimMontages.

Your questions are not really related to the plug-in, but I’ll answer them any way.

  • If you have already had the boolean, then just check it with a branch node.
  • You can create a boolean on your character, and set it when the notify is triggered. Then you can check the boolean wherever you want.
  • Certainly I can do that, but it should be your homework, shouldn’t it?

Thank you so much, you’ve helped me a great deal :slight_smile:

Yes, I was only asking because I’m still not yet adept at using this plug-in yet, and was hoping to have an example to compare my work to when I inevitably screw up at reproducing the concept (l always have tab opened up to answerhubs and the UE4 docs for this very reason LOL).

That question was really just a stretch goal because I realize that you’re quite busy, so no worries :slight_smile:

@Aumaan_Anubis

Yeah, recently I have been busy looking for a rent.

To be honest, I am not sure why you asked the first question. You should’ve known you could check the value of a boolean with a branch node. That should appear many times in my tutorials or others’. Perhaps you really didn’t know, so that’s why I said it should be your homework, no offense.

But maybe your true question is not that. If you expect step-by-step answers, you have to elaborate your questions technically. Otherwise, you are asking people to guess and they can only give you vague answers. However, don’t put irrelevant details into your questions. That will, on the other hand, waste others time and energy to interpret your sentences and sometimes people would just turn away when they run out of energy.

Thank you, you’ve helped me :smiley:

Well I found that I had to do some casting or checking to get proper access to the bool I needed, that’s why it didn’t work when I tried it before following the tutorials.
I didn’t know that, so that’s why I wanted to see what I did wrong, I got it now thanks to your help here combined with your videos.

*(What constitutes as “irrelevant information” is not obvious to me, I’m not a programmer. I try to find a popular example to reference, explain it, and hope to learn the theory behind executing it.
Sorry my questions weren’t exact or technical enough, but that’s the best I can do when I don’t know the correct method yet, before I can ask questions that make actual sense to programmers)
*
Sorry if I took any more of your time, and thank you again so much for helping me :wink:

As a programmer, I like to ask direct questions and give others a minimal example to reproduce the problems in question so they can examine the case. If it were me, I would ask my question like I had a boolean on my character but I wanted to check it when an event is triggered on my player controller. And I would make sure following my description could reproduce the problem, no more no less.

But it’s not practical for non-coders, or at least not for inexperienced scriptors. They would probably post pictures of their Blueprints but still miss crucial information. For non-coders, your approach is indeed more viable. And you can always ask follow-up questions when people give you vague answers so you can break down your problems. Although it takes more steps, now I can see why you did that.

Great lil plugin.
For C++ projects, in the advance version, if you get LogCompile Error about the UPROPERTY not being set for Editable properties.

https://forums.unrealengine.com/filedata/fetch?filedataid=120545&type=thumb

Simply add "Category= “Input Buffer” to the UPROPERTY declaration the compiler complains about. Not sure why I’m the only person with these issues

https://forums.unrealengine.com/filedata/fetch?filedataid=120546&type=thumb

I also was until now! Thanks so much for this.