x

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"

FlipFlop problem, constant switching from A to B to A....

Hallo, I am new to Unreal Engine and have a problem with the FlipFlop node. When I execute the node my Test variables is constantly changing from True to False to True...... When I execute it again it is set to True. When I execute it again it is switching from True to False to Ture.... again. And so on. In another Project I tried the same script and it was working without problems. I am looking forward to a quick reply. Thank You! alt text alt text alt text

Product Version: UE 4.14
Tags:
more ▼

asked Apr 10 '17 at 01:49 PM in Blueprint Scripting

avatar image

Jakob_G
3 2 3

(comments are locked)
10|2000 characters needed characters left

4 answers: sort voted first

When you press an action input it doesn't trigger the Pressed pin a single time. Instead, it keeps firing.

Try using a DoOnce, with the reset connected to the Release, and a set(not) at its exit, and it should flip your variable only once. Otherwise, constantly changing from true to false and so on is exactly the expected behaviour of your setup, and I don't see how it could be working on a different project.

more ▼

answered Apr 20 '17 at 04:08 PM

avatar image

rcortese
81 7 6

avatar image Jakob_G Jun 12 '17 at 06:03 AM

Thank you! This worked for me.

(comments are locked)
10|2000 characters needed characters left

ah whait - I think the problem is how you've setup your event tick! Don't do that this way! create a timer on begin play and do your stuff in this timer. the way you've set it is delaying the tick which is not a good idea :)

feel free to provide some more input what you ' re willing to do as it looks som kind of wired the way it is setup :)

Attached Screenshot works alt text

flipflop.png (175.3 kB)
more ▼

answered Apr 10 '17 at 02:58 PM

avatar image

Adnoh
220 5 12 16

avatar image Jakob_G Apr 10 '17 at 03:02 PM

Ok, Thank You for Your answer. I copied the script from the PlayerCharacterBP to the PlayerControllerBP and now it is working perfectly. Why isn´t it working in the Player CharacterBP? Thanks in advance for an answer.

avatar image Jakob_G Apr 10 '17 at 03:24 PM

I tried again without a delay node: alt text but still the same problem. When I press the E key once the variable is constantly switching from True to False to True...... alt text

avatar image Jakob_G Apr 11 '17 at 01:20 PM

I realized that my problem isn´t the FlipFlop or the variable, it is just the print string node. Because when I add a watch to the Test variable the value is correct. Somehow the print string node is outputting the Test veriable and a True at once. sorry for my bad english, I hope you understand what I mean

(comments are locked)
10|2000 characters needed characters left

Hello Jakob_G,

This is working as intended. The flipflop node is meant to alternate between A and B each time that it is called. I have provided a screen shot below of the tool tip that is given for the node. I have also included a link to the flow control documentation. This part of the docs provides information on the nodes used to control the flow of execution in your blueprints. Please be sure to check documentation for intended behavior before filing a bug report. I hope that this helps.

Link (docs): https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/FlowControl/

Tooltip:

alt text

Make it a great day

more ▼

answered Apr 10 '17 at 03:05 PM

avatar image

Rudy Q ♦♦ STAFF
47.9k 544 132 521

avatar image Jakob_G Apr 10 '17 at 03:11 PM

Thank You for Your reply. I know how a FlipFlop works. But the problem is when I press the E key once the variableis is not stopping changing from True to False to True......

(comments are locked)
10|2000 characters needed characters left

Use ONE of the attached setups

alt text

flipflop.png (61.5 kB)
more ▼

answered Apr 10 '17 at 02:04 PM

avatar image

Adnoh
220 5 12 16

(comments are locked)
10|2000 characters needed characters left

Thank You for your quick reply. But this has not changed anything. When I press E the Test variable is still constantly switching from True to False. alt text alt text alt text

more ▼

answered Apr 10 '17 at 02:40 PM

avatar image

Jakob_G
3 2 3

avatar image Adnoh Apr 10 '17 at 02:57 PM

hm.just testetd again in 4.14 and it does not happen in my test. can you set a break point on the "set test" and do a search if you're not setting the variable anywhere else? (the flipflop works also - just wanted to be sure which i was postet the 2 alternatives). I now it is ugly, but try it in a new blank 4.14 project - I'm sure it works on your pc to. maybe test a other key?

(comments are locked)
10|2000 characters needed characters left
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