# Do something if two booleans are true

**URL:** <https://forums.unrealengine.com/t/do-something-if-two-booleans-are-true/350874>\
**Category:** Blueprint\
**Tags:** boolean, flow-control, branch, unreal-engine, question, Blueprint\
**Created:** [March 17, 2016, 5:26pm UTC](https://forums.unrealengine.com/t/do-something-if-two-booleans-are-true/350874 "2016-03-17T17:26:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marco\_I](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Marco\_I](https://forums.unrealengine.com/u/Marco_I)\
**Post date:** [March 17, 2016, 5:26pm UTC](https://forums.unrealengine.com/t/do-something-if-two-booleans-are-true/350874/1 "2016-03-17T17:26:57Z")

</div>

Hey guys.  
Very simple (and probably stupid) question, but I can’t figure it out, that’s incredible lol.

I want to make something after that two booleans become “TRUE”. How can I do that?  
I’ll post a screenshot to help you to understand what I’d want to do.

![82655-booleansproblem.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/5/ad5623f2d4c3149c99a754c59b0732b907fbfb09.png)

Of course, and “AND operator” is not the best choice, since it returns true also when both are false. I need to be sure that both of them are TRUE, and then give the output to the branch node.

Thanks.

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [March 17, 2016, 5:33pm UTC](https://forums.unrealengine.com/t/do-something-if-two-booleans-are-true/350874/2 "2016-03-17T17:33:54Z")

</div>

AND returns True only when both bools are true. NAND returns True when both bools are false. So you can use AND, or use two branches for the bools and attach them one after the other via their True pin.

---

<div class="post-metadata">

**Author:** ![Marco\_I](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Marco\_I](https://forums.unrealengine.com/u/Marco_I)\
**Post date:** [March 18, 2016, 8:42pm UTC](https://forums.unrealengine.com/t/do-something-if-two-booleans-are-true/350874/3 "2016-03-18T20:42:40Z")

</div>

Exactly.  
The fact was that I tried a million times with the AND operator, and the entire function never worked. Now I realized that the error was a stupid thing before the end.  
Darn… I got a degree in Computer Science and I was forgetting everything about logical operator… hurrah!

Thanks anyway.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e317d48f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e317d48f](https://forums.unrealengine.com/u/anonymous_user_e317d48f)\
**Post date:** [June 15, 2019, 11:49am UTC](https://forums.unrealengine.com/t/do-something-if-two-booleans-are-true/350874/4 "2019-06-15T11:49:46Z")

</div>

I was blown away when I read this, and had to test it to confirm

“and” node, both inputs being false - always results in false. Confirmed

 ![279878-screenshot-923.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/b/d/cbd48f492a6485142906ae7e9730d22cf610c5a0.png)
