How is it possible that this AND can ever result in true?

image

I’m looking at examples of animation blueprints and am perplexed seeing this in a macro. Essentially the way this reads to me is as follows:

If IsAttacking and IsNotAttacking

I can’t imagine this ever being anything except false, however the animation blueprint works correctly and this is often fired as true. Any thoughts?

Thanks for reading.

Object oriented programming.

All you see is same code, however code you see in editor is not actually what is processed in game.

You have (probably) two different actors of same class, they have same code, but they are different copies of that code in memory.

So one copy has Is_Attack = True another copy has Is_Attack = False.
Ant then AND may be true.

1 Like

Appreciate the feedback, i’ll try to take another look at the blueprint from the perspective that these are in fact not the same object. Thank you.

Thank you Nawrot you helped me find out what is going on. The variable “isAttack” at the top is a variable created by the AnimInstance, the other “isAttack” is a variable belonging to the referenced Character instance. Unfortunately they are named the same but indeed they belong to two separate entities and are not referring to the same variable.