AND Boolean that's making my head spin

Hey Everybody,

I am having difficulty with the most basic node ever - AND :smiley:

My setup above:
the first 2 variables (new incoming | which loop new) are 1 & 2 → not equal = FALSE
the 2nd 2 variables (new variation | current variation) are 1 & 1 —> equal = TRUE
I’d expect the AND node to send FALSE - since not both nodes are TRUE
but it sends TRUE! how come?

I’m simply looking to send True only if both conditions are True, and false otherwise.

Is that another node and not AND?

Thanks in advance

Elad

Are you extremely sure that’s the value of your variables? Have you tried it with PrintString (without relying on what the blueprint debugger tells you)?

100% sure

not just with PrintString, but also I hover on top of them to verify

I’d be careful with that 100% :smiley:
AND is only true if both of its input pins are true.
Just to confirm… I can see that you are using the False pin of that Branch, is that what you want? That’s like saying NOT AND.

1 Like

Here is a video example of showing that one value is 1, the other is 2,
but the condition of them being equal comes out as TRUE //

and yes I basically only want to continue if it’s False.

I have a
Loop Number
Variation Number

So if both NEW loop number + variation number match the CURRENT ones - it means “don’t do anything”
If NEW loop number or NEW variation number changed, then DO something.

That’s why I only act on False

As mentioned before, please don’t rely on the blueprint debugger. Just print out all float values, and you’ll see that they are different from what the debugger tells you.

Clipboard Image
Here

the two blue values are equal = true
the two pink ones are not = false
the AND returns true

May or may not be relevant - try it with:

image

instead.

Didn’t help, so crazy

Ok update!
It might be related to some internal execution order,
I see that the condition is being printed in the middle and not at the end,

so I’m gonna dig and see what causes that

Thanks everybody for your help

Ha, cool vid. Something is dodgy. The debugger is lying to you. My bet is that your floats are not what you think they are at the time of evaluation:

Breaking down in a Print could help you see what equation is actually passing:

1 Like

I suggest move the print node right before the branch node so you have an exact idea of what is being compared during the execution.

Hey everybody

So it turns out it was an OSC problem.

The two tasks which update the variables and then execute the AND function were not executed in the right order, even though I set it to.

That caused the AND to be calculated before the variable was updated.
The debugger was showing things correctly, just didn’t take into account when the AND was calculated and showed the final result.

Thank you all for your help and sorry for this being actually my mistake :slight_smile: !

3 Likes