Select Node still evaluated before its index; Workaround?

Hey there!

I ran into problems with following setup of nodes:

When Active Weapon is unset, evaluation of Weapon Type causes an exception. I tried a workaround by checking its validity “beforehand” but select Node inputs get evaluated even if they will not be necessary?

How can you work around this without creating branch node hell? In this case, with an enum entry “None” I can just use a pure function (so no execution input needed) that checks the validity beforehand and returns None as default, but what if there is no default value?

EDIT: Well the whole evaluation could be moved to a pure function as well, to avoid annoying execution flow, but this might cause a lot of unnecessary functions…

related post: Select Float - Both A and B are evaluated? - Blueprint - Unreal Engine Forums
related issue: Unreal Engine Issues and Bug Tracker (UE-22021)

Hi LordStuff

I know it’s not an answer to your question, but it should be a workaround for what you’re trying to achieve. You can still use “validated getters” inside pure functions. So you won’t need an execution pin.

In this example, I just used a widget.

I hope this helps

Alex

I guess in this very specific case it is a valid answer.