This chapter will explain how the input work in the template.
The default input configuration, but it's totally dynamic it's up to you to configure your inputs :
1. Input Configuration
The input stored in the DT_AFT_InputConfiguration.
Each line is a Game Input
A GameInput contains a list of PlateformInput.
You can found input struct here :
So a PlateformInput have :
- Key : Like in Unreal project setting. Is the key needed to trigger this plateform input
- The input icon
- The input platefrom controller representation (keyboard, PC Controller, Switch, etc)
2. Input Buffer Sequence
To manage the input combinaison like in fighting game, you have the InputBuffer
This struct have :
- InputId : The game input attached (Example 1 => Up Arrow)
- ValidTime : The input lifetime
The InputBufferSequence contains a list of InputBuffer
Example of input sequences :
In our example this mean have 4 buffer input in the list.
In the next section we will see how works the input sequence triggering associate with the action.
3. Command Action
The struct CommandAction manage the execution of an Action from Input buffer sequence success execution
This struct have :
- ActionId : The action to execute by default
- Priority : The priority of the command action execution (if you have an another action starting with the same input sequence, you should give a higher priorty of the shortless command action
- Operator : AND or OR
- InputCommand : More explain in the next section
- ActionSuccess : The action execution from the character situation
The input command it's the buffer sequences, but can precise if the arrow direction are relative of the character direction
4. Command Action and Controller
Before to see how the Command Action execute an Action, here is how the Input System detect your global input configuration
In the PlayerController :
And in the Fighter Controller, is the OnCommandActionSuccess event from Input System are called when you successfuly trigger a Command Action
The fighter attached to the controller will execute the action
5. Fighter Action Command
The list of the input command are stored in each character folder as a DataTable. For example in Siria character you can found this:
An example of one row :
- 3 Inputs - 2::Down | 4::Right | 5::W(A Button)
- Action execution if success (from character situation)