Interruptable Latent Blueprint Nodes

Hi guys!

I’m currently trying to build a new latent blueprint node that has a number of features. The node should have multiple outputs - for the sake of example, one that fires once the task the node has completed it’s action (e.g. playing a sound), and one that fires if the node has been interrupted by a condition having been met (e.g. a keypress). It’d be good if the condition were to appear much like an input.

I’m a little unsure of how to go about this, or even how feasible it may be. How would people approach this problem?

The standard Latent blueprint node really only seems to be setup to have one output/callback. To support that callback there is extra code in the Kismet compiler classes that handle finding the callback state and inserting that into the compiled bytecode. So I think it would most likely be quite a bit of work to adapt that to support extra outputs.

However the UK2Node_LatentAbilityCall node (source is in “Editor\GameplayAbilityEditor”), does support multiple outputs from ability tasks. The ability tasks have multicast delegate based events, and each event has a output from the node. So any nodes connected that output get triggered when the event is broadcast. That node only works in GameplayAbility blueprints, however maybe you could use the source code as a starting point to make a node that works in standard blueprints. Or maybe the easiest method would be to make whatever you want to do, into a gameplay ability task, that is started from a ability. Depending on what you want to do, I would think that would be the quickest way, but might seem a bit hackish.

Thanks Matt, this is probably some of the best info I’ve received. The issue of being able to interrupt the node also still stands, of course.

For the time being I’m just using an object with a blueprint interface instead, but it results in some long-winded blueprint setups…