# If x + y + z etc = true then do X

**URL:** <https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145>\
**Category:** Blueprint\
**Tags:** actor, condition, branch, unreal-engine, UE4, Blueprint, question\
**Created:** [September 14, 2015, 1:26pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145 "2015-09-14T13:26:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pantlessnoodle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pantlessnoodle](https://forums.unrealengine.com/u/Pantlessnoodle)\
**Post date:** [September 14, 2015, 1:26pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145/1 "2015-09-14T13:26:10Z")

</div>

Hi guys, ok so basically i have 5 Objects that can be picked up, as they are picked up the actors are destroyed,how do i make it so after all 5 are collected then something happens. eg. If all 5 are collected and the conditions are met then quit game.

 ![58535-blueprint+problem.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/f/2/ff2b146e4a9d9b22576b1e320506e45559befe17.jpeg)

---

<div class="post-metadata">

**Author:** ![mamoniem](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mamoniem/32/1194698_2.png) [@mamoniem](https://forums.unrealengine.com/u/mamoniem)\
**Post date:** [September 14, 2015, 1:28pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145/2 "2015-09-14T13:28:53Z")

</div>

You can add integer variable = 0. And with any new collected item, you add 1 to the value (using the node int + int) . And also check if it is 5 or still less, if 5 then do whatever you want.

-m

---

<div class="post-metadata">

**Author:** ![Pantlessnoodle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pantlessnoodle](https://forums.unrealengine.com/u/Pantlessnoodle)\
**Post date:** [September 14, 2015, 1:34pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145/3 "2015-09-14T13:34:40Z")

</div>

Ah nice thanks dude gonna give this a look into and see what i can do! Il get back to you and tell you how it went XD

---

<div class="post-metadata">

**Author:** ![mamoniem](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mamoniem/32/1194698_2.png) [@mamoniem](https://forums.unrealengine.com/u/mamoniem)\
**Post date:** [September 14, 2015, 1:36pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145/4 "2015-09-14T13:36:37Z")

</div>

Looking forward to hear back, if it was not clear, lemme know, I can build it 4u while working 😉

-m

---

<div class="post-metadata">

**Author:** ![Pantlessnoodle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pantlessnoodle](https://forums.unrealengine.com/u/Pantlessnoodle)\
**Post date:** [September 14, 2015, 1:39pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145/5 "2015-09-14T13:39:27Z")

</div>

That would be great man, your knowledge is mighty please teach a pleb like me 😃

---

<div class="post-metadata">

**Author:** ![mamoniem](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mamoniem/32/1194698_2.png) [@mamoniem](https://forums.unrealengine.com/u/mamoniem)\
**Post date:** [September 14, 2015, 1:47pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145/6 "2015-09-14T13:47:07Z")

</div>

No worries 🙂 we all learning everyday 🙂

Is that clear? I wrote some comments for you.

 ![58537-screen+shot+2015-09-14+at+9.45.35+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/4/384e3b1f51d418b773254cad2c9571ac92b972f4.png)

-m

---

<div class="post-metadata">

**Author:** ![Pantlessnoodle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pantlessnoodle](https://forums.unrealengine.com/u/Pantlessnoodle)\
**Post date:** [September 14, 2015, 1:58pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145/7 "2015-09-14T13:58:28Z")

</div>

Thanks a lot bro, il get back to you, still trying to get my head around this XD

---

<div class="post-metadata">

**Author:** ![Pantlessnoodle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pantlessnoodle](https://forums.unrealengine.com/u/Pantlessnoodle)\
**Post date:** [September 14, 2015, 2:26pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145/8 "2015-09-14T14:26:00Z")

</div>

YES! got it working man, you rock! thanks ever so much!

---

<div class="post-metadata">

**Author:** ![mamoniem](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mamoniem/32/1194698_2.png) [@mamoniem](https://forums.unrealengine.com/u/mamoniem)\
**Post date:** [September 14, 2015, 2:39pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145/9 "2015-09-14T14:39:55Z")

</div>

Sweet 🙂

-m

---

<div class="post-metadata">

**Author:** ![mamoniem](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mamoniem/32/1194698_2.png) [@mamoniem](https://forums.unrealengine.com/u/mamoniem)\
**Post date:** [September 14, 2015, 2:41pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145/10 "2015-09-14T14:41:14Z")

</div>

Don’t forget to mark the question as answered (green colored).

-m

---

<div class="post-metadata">

**Author:** ![Pantlessnoodle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pantlessnoodle](https://forums.unrealengine.com/u/Pantlessnoodle)\
**Post date:** [September 14, 2015, 2:50pm UTC](https://forums.unrealengine.com/t/if-x-y-z-etc-true-then-do-x/332145/11 "2015-09-14T14:50:49Z")

</div>

Done! Once again thanks man!
