Download

Multi input switch

Is there a BP node that allows multiple exec inputs and switches to a single exec output? Something like a Case/Switch in C.

Use case: I test for multiple conditions, each condition merits a different input location vector to a Set Actor Location node. Currently, I can use a series of Branches, but for some reason it makes a standalone build’s display go crazy. Works fine in the editor window and new editor window though, but that’s a separate issue. I should mention that this is inside a Macro, where you don’t get to set actual variables, which would be nice and would moot this issue nicely.

Ideally, it would be a node that: given 3 vector inputs, would choose between them based on an integer, then output the chosen vector for passing to a Set Actor Location’s New Location vector.

I’m currently transitioning from/co-tasking in Houdini, where multi-input switch nodes are a way of life. Any input would be greatly appreciated, especially pointers to where this has already been done. Thanks!

cheers,
-John

My solution is kind of workaround, nor true elegant one:

for your vectors problem, use “make array” connect all 3 of them then just get array node to get value from array you just made.

That would pretty much do it, thank you!

Hi John,

Check out the Select node. It does exactly what you describe, letting you add inputs and choose from them based on an ‘index’ type (integer, byte, or Boolean).

Cheers,
Michael Noland

Thanks Michael! I’ll check that out.