Calling parent function works only when alt tabbed. Local version works

I have a function in a parent class:

http://puu.sh/sdFg8/b25a4ea869.png

If I use the same logic locally in my child class it works well:

http://puu.sh/sdFit/810958065b.png

However, If I call the parent class function it does not work:

http://puu.sh/sdFl1/fd5f7fefef.jpg

The result is always this:

http://puu.sh/sdFof/ec4b04ef51.jpg

The values I print are updated just fine, but the boolean that I return does not become true. Except if I alt tab out.
Most likely the slowdown of the frames and thus the increased delta time is the cause, but I dont see why it causes this discrepancy. Why does the local version work while the parent function does not?

Any ideas? Is this a bug? It is just a normal function being called in a child class.

Hey NoobsDeSroobs-

What you’re seeing is actually expected behavior. When you reach the branch node in your last screenshot, it looks back to the Update function to find what the value of the boolean should be. What’s happening is that it’s comparing Current Time vs Switch Time after the (Current Time - Switch Time = Current Time) nodes have executed. So if we assume Switch time is 20, then current time reaches 20.something, then you subtract 20, then compare the “something” against 20 (which will be less and return false).

If you create a boolean variable and store the value of your comparison prior to the function branch node, and then return the boolean variable, you should see the behavior you’re looking for.

Cheers