I’m using an AND operator to check if BOTH of my variables are set to true in a branch node, then if true it will execute my code. But for some reason the code executes when only one of the variables is true, NOT both. Is it a bug or have I made an error?
begin play only runs ONCE at the beginning…thats why its called like that
I dont know your code but connect to event tick instead so it will be run on every frame.
when i connected it to event tick, it will just execute the code after the branch, not even paying attention to the conditions needed to execute it, so therefore I don’t actually know what to connect the execute to
Just having a quick look. I might be wrong so someone please correct me.
I think it would be better to use the values of each of the Booleans (Overlap, Overlap 2) rather than the return node. Essentially, you are getting the return values of those nodes which are both set to true but not the values of the Booleans you are wanting to change based on those conditions.
The events you have that set the booleans will store TRUE to those booleans when they trigger at any time.
in event tick you can read those booleans and will keep the current value like this:
event 1 triggeres → sets bool1 to true
event 2 triggers -->sets bool2 to true
event tick (runs all the time) evaluates current value of bool1 and two and if true does something.
also you dont have to wire the branch conditions from the SET in the events you can GET the booleans from the variables list in the left side of the screen.
Thank you for the reply, I tried this in a post above that someone else commented, you can check it out but it still doesn’t work, it continues to ignore the conditions that both need to be set, and just executes the code after branch straight away.
Hello quick update: your post really helped, thank you for letting me know about event tick, the main problem was I had to set the default values to = NOT true, instead of true, also when connecting it to the AND operator.