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.

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

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.

how are you understand this?

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?

try this )

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)

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.

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?

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

Everything shows on it :wink:

Yes. Thanks again!