I am working in an actor blueprint and want to query the current state of its AI State Tree so I can perform the correct logic. How do I accomplish this?
there is no built-in “get current state” blueprint node, which is why you are hitting a wall. what exists:
UStateTreeComponent (or the AI one: UAIStateTreeComponent… on pawns it usually lives as “StateTree” on the StateTreeAIComponent) exposes GetInstanceState / the runtime context — in C++ that is FStateTreeExecutionContext with CurrentState. Blueprint exposure is thin, so the practical BP route is a comparer/evaluator.
the intended BP pattern is a StateTreeComparer: StateTree instances support Comparers (FStateTreeInstanceComparer) — you implement one that hashes the current state (GetInstanceState → state name as FName) and then QueryInstance for it elsewhere. Epic’s sample uses this for “is the character doing X” checks. still C+±ish work but it is the sanctioned path.
the zero-code workaround most people ship: mirror the state. add an instance data property (e.g. CurrentStateName as FName) on the actor, and in every state that matters add a tiny task (or a transition condition evaluation) that writes a literal into it. two extra nodes per state, and any blueprint on the actor can read the variable. it cannot go out of sync in the states that write it — and you only need to instrument the states you actually branch on, not the whole tree.
if you want reactive behavior rather than polling: transitions ARE the reactive layer — instead of “other logic reads state and reacts,” add transitions from each state on the events/conditions that should interrupt. behavior-tree-minded people poll; StateTree-minded people add transitions. going full event-driven usually removes the need to query the state at all.
for a quick BP-only answer: option 3 today, or one small C++ comparer if this is a long-lived project.