I have a macro where I check the validity and type of a weapon actor variable.
In programming, if the first variable in an AND is false, the whole AND is automatically considered false and the other variables don’t get checked. So I thought this would be a valid way to go:
All the inputs to UFUNCTIONS() get passed in as parameters so of course they need to be valid, I just never thought about it for some reason despite having used the macro a plenty to make my own nodes… although the input parameters for select node are not as standard as on other nodes, they are still input parameters.
Personally I prefer the visual feedback with a grey top bar and the ? symbol on top of the is valid node, validated get node makes the graph less readable imho. The grey top bar in particular will be consistent with all gates, branches and sequences and such which result in branching logic.
That said it’s another way to do it, though it’d be nice if validated get nodes also had some kind of visual highlighting that would make it easier to visualize the graph.
As GarnerP57 already mentioned, there seems to be no short-circuiting evaluation. It seems that Blueprint evaluates all of the nodes as soon as they are needed for your macros And-Node.
If you really want to avoid having execution wires I’d suggest to convert the macro to a function that is both pure and const, as seen in the attached image. In the picture I have also included the (selected) resulting node