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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Help me understand this behavior

The setup is simple. Basically I expect the particle system to switch on when the integer is equal to 1 and switch off otherwise. But it activates and deactivates on random numbers. Or at least it appears to be random.

alt text

Product Version: UE 4.15
Tags:
more ▼

asked May 04 '17 at 07:13 AM in Blueprint Scripting

avatar image

aristides
136 10 13 23

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

2 answers: sort voted first

Thank you. Your setup works. I found that if in my original setup I replace ==1 with !=1 it works as it supposed to. Though I still don't understand why ==1 doesn't work.

more ▼

answered May 05 '17 at 07:49 PM

avatar image

aristides
136 10 13 23

avatar image 6r0m May 05 '17 at 07:52 PM

please read again my post before - again I tell to you that you setup work as needen, but for print string it's generate number too.

Do you understand this?

avatar image aristides May 05 '17 at 07:56 PM

Yes. Thanks again!

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

in both cases you use one print string - when deactivate and activate. for better debugging use one for actvate and another to deactivate (make different color). also you can add breakpoint in activate (right click on this node), when game freeze you can read value

more ▼

answered May 05 '17 at 10:12 AM

avatar image

6r0m
424 18 16 26

avatar image aristides May 05 '17 at 06:40 PM

Thank you for advice, 6r0m. It doesn't help me understand what I'm doing wrong here. The boolean branch still thinks that 2 (or any other number) could be true or it could be false.

avatar image 6r0m May 05 '17 at 06:49 PM

how are you understand this?

avatar image aristides May 05 '17 at 06:54 PM

Well, with two print string nodes it prints out blue numbers if boolean statement is true or red numbers if it's false. I think that's what you suggested. The branch activates or deactivates the particle system on ether kind of numbers. Could you try this setup and see if it behaves the same way?

avatar image 6r0m May 05 '17 at 07:26 PM

try this )alt text

capture.png (256.4 kB)
avatar image 6r0m May 05 '17 at 07:37 PM

and I think random integer in range work multiple times by tick for first branch and for print string.

I used "set timer by Function Name with time 2 (loop), and when it's shoot "random integer in range" give number for print string function and for another function branch.

It's work correct for you activate system and you can check it by logic above. but should to know that "random integer in range" give random numers for each function which run it stuff.

Am I right?)

ps: and in my case above not good solution five branch, because it's will be generate numbers five times. I suggested you use "switch on int" . sure, it's for checking . it's work right in your first example (but as I said switch on int working two times for tick - branch and print string)

avatar image aristides May 05 '17 at 07:55 PM

"random integer in range work multiple times by tick for first branch and for print string" That's probably the answer.

avatar image 6r0m May 05 '17 at 07:56 PM

Everything shows on it ;)

(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