Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Logic Error: Gate not opening for condition

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?

alt text

Product Version: UE 4.14
untitled.png (153.6 kB)
more ▼

asked Feb 17 '17 at 08:44 AM in Blueprint Scripting

avatar image

23 16 20 25

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Feb 17 '17 at 09:25 AM

avatar image

37 5 6 10

avatar image AemonBarz Feb 17 '17 at 09:55 AM

YES! Thank you, that worked. Absolute legend.

avatar image AemonBarz Feb 17 '17 at 09:57 AM

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.

avatar image SirDouchebag Feb 17 '17 at 10:18 AM

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.

avatar image AemonBarz Feb 17 '17 at 10:52 PM

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

avatar image SirDouchebag Feb 18 '17 at 03:36 AM

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.

avatar image AemonBarz Feb 18 '17 at 04:24 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question