# Logic Error: Gate not opening for condition

**URL:** <https://forums.unrealengine.com/t/logic-error-gate-not-opening-for-condition/385217>\
**Category:** Blueprint\
**Tags:** Script, logic, unreal-engine, Blueprint, question\
**Created:** [February 17, 2017, 8:44am UTC](https://forums.unrealengine.com/t/logic-error-gate-not-opening-for-condition/385217 "2017-02-17T08:44:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AemonBarz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AemonBarz](https://forums.unrealengine.com/u/AemonBarz)\
**Post date:** [February 17, 2017, 8:44am UTC](https://forums.unrealengine.com/t/logic-error-gate-not-opening-for-condition/385217/1 "2017-02-17T08:44:29Z")

</div>

I am trying to make it so that every time the user clicks on the collision cube, the count will go up by one. Once the count reaches a certain variable, which is defined earlier in the logic, the gate should open and print the text. However none of that is happening. When I reach the required input value, nothing happens. Can anyone explain where the logic is incorrect, please?

 ![126711-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/e/4ae7e0cb96e55f2839be48abe0817bc6fd1fad7d.png)

---

<div class="post-metadata">

**Author:** ![SirDouchebag](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SirDouchebag](https://forums.unrealengine.com/u/SirDouchebag)\
**Post date:** [February 17, 2017, 9:25am UTC](https://forums.unrealengine.com/t/logic-error-gate-not-opening-for-condition/385217/2 "2017-02-17T09:25:15Z")

</div>

Are you doing anything to fire the Open input on the gate node? For testing purposes try just hooking up Event Tick to the gates Enter. If you want it to fire from the same logic that adds to the count, try a sequence node.

---

<div class="post-metadata">

**Author:** ![AemonBarz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AemonBarz](https://forums.unrealengine.com/u/AemonBarz)\
**Post date:** [February 17, 2017, 9:55am UTC](https://forums.unrealengine.com/t/logic-error-gate-not-opening-for-condition/385217/3 "2017-02-17T09:55:31Z")

</div>

YES! Thank you, that worked. Absolute legend.

---

<div class="post-metadata">

**Author:** ![AemonBarz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AemonBarz](https://forums.unrealengine.com/u/AemonBarz)\
**Post date:** [February 17, 2017, 9:57am UTC](https://forums.unrealengine.com/t/logic-error-gate-not-opening-for-condition/385217/4 "2017-02-17T09:57:54Z")

</div>

However, it does just keep printing the result over and over once the branch is true. Is there a way to only have it fire once, after the condition is true? Thanks.

---

<div class="post-metadata">

**Author:** ![SirDouchebag](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SirDouchebag](https://forums.unrealengine.com/u/SirDouchebag)\
**Post date:** [February 17, 2017, 10:18am UTC](https://forums.unrealengine.com/t/logic-error-gate-not-opening-for-condition/385217/5 "2017-02-17T10:18:57Z")

</div>

I assume you used the Event Tick fix, try the other one I mentioned. That way when you exit the box you first add 1 to count, then you open the gate if count = whatever you want, then you enter the gate. This will only happen once since the next time you exit the box count will be 1 greater than the value you want. Add a sequence node, it should explain itself.

---

<div class="post-metadata">

**Author:** ![AemonBarz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AemonBarz](https://forums.unrealengine.com/u/AemonBarz)\
**Post date:** [February 17, 2017, 10:52pm UTC](https://forums.unrealengine.com/t/logic-error-gate-not-opening-for-condition/385217/6 "2017-02-17T22:52:40Z")

</div>

I don’t really understand what to do, can you explain it a bit better? Where do I put the sequence node exactly?

---

<div class="post-metadata">

**Author:** ![SirDouchebag](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SirDouchebag](https://forums.unrealengine.com/u/SirDouchebag)\
**Post date:** [February 18, 2017, 3:36am UTC](https://forums.unrealengine.com/t/logic-error-gate-not-opening-for-condition/385217/7 "2017-02-18T03:36:20Z")

</div>

When you compare “Count” to “Var 3” put a sequence node after the “True”, then from the “Then 0” output go to the gates “Open”, from “Then 1” got to the gates “Enter”, that should do the trick.

---

<div class="post-metadata">

**Author:** ![AemonBarz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AemonBarz](https://forums.unrealengine.com/u/AemonBarz)\
**Post date:** [February 18, 2017, 4:24am UTC](https://forums.unrealengine.com/t/logic-error-gate-not-opening-for-condition/385217/8 "2017-02-18T04:24:49Z")

</div>

That worked wonders. Actually a god among men, thanks mate.
