Input Sequence

Kehel18 - Code Plugins - Aug 8, 2022

Input Sequence plugin allows you to process Input Action and Input Axis events and their sequences

  • Supported Platforms
  • Supported Engine Versions
    4.26 - 4.27, 5.0 - 5.1
  • Download Type
    Engine Plugin
    This product contains a code plugin, complete with pre-built binaries and all its source code that integrates with Unreal Engine, which can be installed to an engine version of your choice then enabled on a per-project basis.

Input Sequence


DOCUMENTATION - https://github.com/klauth86/UE_Plugin_InputSequence/wiki


TUTORIAL VIDEO - https://www.youtube.com/watch?v=pMpKCx338mQ


This plugin consists of two primary assets - Input Sequence Asset and Input Sequence Event


Input Sequence Asset (accessible from Content Browser context menu, Misc category) is used to build logic around Input Action and Input Axis events and their sequences. It is configured with Graph Editor by creating and connecting nodes, setting properties on them and asset itself. There are several node classes to use:


  • Start node - this node is entry node of asset. Its primary child nodes are called First Layer Nodes (FLN). Each node except FLN and entry node has only one FLN parent
  • Press node - this node is base to build logic around Input Action events and their sequences. It can be in two modes for every Input Action added - CLICK mode and HOLD mode (modes are toggled by down arrow button)
  • Release node - this node is paired node for Press node in HOLD mode and corresponds to release event
  • Axis node - this node is base to build logic around Input Axis events and their sequences. It is passed when value of added Axis is between thresholds that are set on node
  • Hub node - this node is a router. It allows you to split one execution path into several branches. With it you can construct many combos in one Input Sequence Asset
  • Go To Start node - this node resets all active nodes, that have the same FLN parent as it has. This node can help if you have many branches for one FLN node and you want reset them all


Press node, Release node and Axis node process all Input events and so can be called INPUT NODES. Start node, Hub node and Go To Start node define flow and can be called FLOW NODES. INPUT NODES can be ticking and can be reset after some time interval if there is no any Input events for them within that interval (see asset and node props). INPUT NODES also can be reset if there is some Input events that are mismatched to events added on node (see asset and node props).


You can configure props on whole Input Sequence Asset and that logic will be active on every INPUT NODE of it. Also you can override that props on each INPUT NODE itself. INPUT NODES contains several Input Sequence Event subclass collections and that describe callback logic to execute when this INPUT NODE is entered, passed or reset (see node props).


Input Sequence Event is abstract blueprintable class that is supposed to be parent class for C++ or BP subclasses. There is no need to create instances of this class or its subclasses, because all execution is going through default object. You can use Input Sequence Event subclasses on each INPUT NODE when node is entered, passed or reset (see node props). During callback execution you can provide two contexts - STATE context and CALLING context. Every INPUT NODE has one Object prop and one String prop. With them you can define so called STATE context of current INPUT NODE for callbacks (see Input Sequence Event OnExecuteByClass method signature). In a very same way object that is using Input Sequence Asset (CALLING OBJECT) can pass one Object param and one String param (see Input Sequence Event OnExecuteByClass method signature). With them you can define so called CALLING context. STATE context and CALLING context can help you to implement almost any logic that is needed.


As mentioned above INPUT NODES can be reset for one or several purposes. This reset requests can be EXTERNAL and INTERNAL. EXTERNAL reset request is just a call from CALLING OBJECT. INTERNAL reset request is a call from INPUT NODE itself or due to reaching of Go To Start node. In common case there can be several reset requests in one moment. For example, it can be Go To Start node reached and external user reset requested at once. Every call of Input Sequence Asset OnInput method generate information about all reset requests collected for this input processing, so you can pass this kind of information for every callback as param (see Input Sequence Event OnExecuteByClass method signature).


For simplicity plugin also contains PlayerController_IS subclass that just adds two BP Implementable events - OnPreProcessInput and OnPostProcessInput. With them you can add custom logic in BP precisely before engine input processing and after input processing.


Plugin Content folder contains very basic example assets.

Technical Details

Features:

  •  Create, configure and use Input Sequence Asset to build logic around Input Action and Input Axis events and their sequences
  •  Create, configure and use C++ or BP subclasses of Input Sequence Event to implement any other logic that is needed

Code Modules:

  •  InputSequence [Runtime]
  •  InputSequenceEditor [Editor]

Number of Blueprints: 9

Number of C++ Classes: 38

Network Replicated: No

Supported Development Platforms: Win64

Supported Target Build Platforms: Win64

Documentation: https://github.com/klauth86/UE_Plugin_InputSequence/wiki

Example Project: see plugin Content folder

Important/Additional Notes: