Question regarding some blueprint nodes which seem to accept multiple inputs into the same node

I was following the “Twin Stick Shooter with Blueprint” set of video tutorials from the online learning service, and I noticed some interesting behaviour regarding the Destroy Actor node. It looks like it can accept multiple inputs into the same node, like this:

337870-destroyactor.png

Whereas most nodes, like Print String for example, only allow for one input per input node, and will automatically break then link when you try to attach something else:

337901-printstring.gif

I was wondering if this is a hard-coded behaviour in the engine that applies to only a handful of nodes (like Destroy Actor), or is there a way that you can opt-in to this behaviour when creating your own blueprint functions and macros? Also, what is the behaviour in the case of calling Destroy Actor with two inputs in the same node. Does it run Destroy Actor twice in a defined/undefined order, once for each input, or is there an overload of Destroy Actor which takes in an array of actors, and this is merely syntactic sugar which defers to that?

Thanks for reading.
Shane.

It’s because you can have a node accept multiple targets (aka objects) and it will run that same function on each object that you connect to the target pin.

No you cant get this same behavior for variables (integers, floats, strings, etc), because the function is only running on a single target. In order to make a function run multiple times on a single target, you would have to do the following:

1 Like