Do math if boolean is true?

When using blueprints, is there a streamlined way of doing math if a boolean is true and not if it isn’t?

Like, just a simple (+98 to value, if Bool is True) kind of thing.

You could use a branch node.

At the moment I’m using a branch that splits into two copies of the same function. It just feels a bit clunky to duplicate a function repeatedly to make minor numerical adjustments.

It works for what I need now, but I was wondering if there was another way, for future reference.

Perhaps you could create a small macro or a function if you keep needing it repeatedly:

If it’s needed across blueprints, you could use a function library.


Also, before @pezzott1 gets here and takes over the thread :innocent: :

3 Likes

Thank you. I hadn’t seen the Select node yet, and that seems to be quite close to what I was looking for.

Ah, no.

I meant I hadn’t seen it before you mentioned it. I found it no problem once I knew what to look for. Thank you.

1 Like