Custom Flow Macro Library V2

This is an update to a flow macro library I created a few years ago. I’ve made some improvements since then so I figured I would share them here. I think the biggest change is that this library no longer needs any C++ programming to get working (as of V4.22.3). The library for these nodes is attached to this post. All you need to do is unzip the attachment and drag and drop the folder into your project’s Content folder and they’ll be available to any actor in your project.

Please see my previous post if you need some examples on how to use these nodes:

On Flow Start
As its name implies, sends out a pulse at the beginning of a continuous flow of execution pulses. Will only send out another pulse once the flow has stopped and started back up again. A reset pin exists in case you wish to send another pulse through before flow has been cut.

On Flow Start V2
Same functionality as the previous version, except the Reset function has been redesigned to fire by overloading the input pin with a double pulse (see section below regarding overloading macro inputs).

On Flow Stop
Also aptly named, the On Flow Stop node sends out a pulse at the end of a continuous flow of execution pulses. Note the that pulse sent out is Latent (see section below regarding latent executions)

Flow Charge Up
A node that takes in a continuous flow of execution pulses and, after a set amount of time charging, will output a continuous flow of execution pulses. The status of the node (how far along it is in charging) can be monitored by the % output float. The charge in the node will completely dissipate once the input flow is cut. Alternatively, the charge can be immediate set to empty or full by overloading the input pin with a double or triple pulse respectively.

Limited Flow
The opposite of the Flow Charge Up node; will only allow a continuous flow through for a limited amount of time. The flow will then have to be cut to reset the node. Alternatively, the Input pin can be overloaded with a double pulse to manually reset the node.

Hold Until
An improvement over the previously used Hold Gate node; the Hold Until node can be charged by sending an execution pulse to the Input pin and will hold that charge for the given time specified. At any point while the node is charged, an execution pulse can be sent to the Release pin to release the charge to the Output pin. Note that the output is latent if the input was held for any amount of time.

Flow Discretizer
This node takes in a continuous flow of execution pulses and outputs discrete execution pulses at time intervals defined by the Period Input.

Axis Neutralizer
A node that will prevent passage of a continuous flow of execution pulses if the input axis was non-zero at the start of the flow. The node will only allow passage once the flow has been stopped and restarted with the Axis input equaling 0 at the time of the flow restarting.

Multi Pulse Filter
A node used in overloading macro inputs. Will reduce any multi pulse to a single pulse (see section below regarding multi pulsing).

Pulse Reducer
A node used in overloading macro inputs. Will take in a multi pulse and reduce its order by 1 (eg. a triple pulse will be reduced to a double pulse and a double pulse will be reduced to a single pulse. Single pulses will be blocked entirely).

Multi Pulsing and Overloading Macro Inputs
By using the Multi Pulse Filter and Pulse Reducer nodes, macro inputs can be overloaded to do multiple things by double stacking or triple stacking execution pulses:

In the above example, the Flow Charge Up node will begin charging when the InputAxis Fire button is held down. While charging, pressing the Tertiary Fire button will send a double pulse to the Flow Charge Up node which is programmed to set its charge to zero upon receiving such an event. Alternatively, pressing the Secondary Fire button while charging will send out a triple pulse, causing the node charge to be set to full. Pressing either Secondary Fire or Tertiary Fire while the node is not charging will do nothing (although in this case, I forgot to put barriers in place to prevent pressing both at the same time). The functionality of overloading the input is based on the Multi Pulse Filter and **Pulse Reducer **nodes which can be used to execute certain additional things only when a multi pulse is received.

Latent Executions and Things to Look Out For
When you have multiple execution sources and latent nodes in a blueprint, the execution order is as follows:

  1. All execution sources in the reverse order that they were placed into the graph with the exception of Event Tick
  2. Event Tick
  3. Latent Actions in a very inconsistent order

An example is the following graph (note that for this example InputAxis 2 was placed after InputAxis 1):


Upon beginning play, the following is printed on the first frame of play:
1
2
3

4
5 or 6 (or swapped with 6 or 5)
6 or 5 (or swapped with
5 or 6
)
The following is printed on the second frame of play:
7 (T+1)

To summarize the results; latent actions will always fire after non-latent actions and they fire in a very inconsistent and almost random order. Additionally, if a latent node is initialized by a latent execution (such as the delay node before the 7 (T+1) print node, it will wait until the next frame to execute.

Given that most of these custom flow nodes utilize latent nodes in their inner workings it is important that Latent Executions are not used as inputs for these nodes. Doing so will lead to unpredictable behavior.

1 Like

There is a few years ago since your post this but where is the link to download this ? Thanks.

1 Like