skip to Main Content

Creating Latent Blueprint Nodes with Multiple Execution Pins

In this post I’m going to show you how to create latent Blueprint nodes that have multiple execution pins inside the Editor! The code in this post is written in version 4.26 so depending on your version you may need to perform a few changes.

Creating a latent node with multiple output pins

In this section, we’re going to create a latent node which will tick a few times depending on our input. For demonstration purposes, we’re going to create a node that will calculate a few fibonacci numbers in each tick.

Fortunately, it’s quite easy to create nodes with multiple output pins. To do that, create a new C++ class that inherits the BlueprintAsyncActionBase and add the following code to its header file:

Then, in the source file, add the following code:

Compile your code and search for BPAsync Node somewhere in your blueprint graph:

(Click on image to enlarge)

If the node doesn’t appear, restart the editor.

Creating a latent node with multiple input pins

To create a latent node with multiple inputs we need the following:

  • A way to specify the input pins
  • The logic of what’s going to happen once each pin has fired

To demonstrate this kind of node, we’re going to create a function that interpolates an actor between two locations simulating a ping pong effect.

From the engine’s class wizard, create a new C++ class which doesn’t inherit anything and add the following code:

Once you’re done with this code, add a new Blueprint Function Library class in your project and type in the following code:

Then, inside the source file add the following code:

At this point, you can compile your code and test the ping pong action we have created! You can open up any blueprint graph and search for the PingPong node (if the node doesn’t appear, you may need to restart your editor).

To sum up, in order to create a node with multiple input execution pins we created:

  • An “Action” class which is performing the logic of what’s happening when each pin fires and
  • An Enum which allows us to expose the different options in the UE Editor
Ping Pong node

Avatar photo

This Post Has One Comment

  1. Hello! Thanks for the article. Is there a way, when we want to use the 2nd approach with LatentActionManager but want also the “default” (non-latent) exec” pin coming out from the node? I see there is that possibility by default for latent node made by the 1st approach.

    What I need is basically a latent node created by a latent manager having both latent, and non-latent nodes.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back To Top