Is it possible to reference a state machine and/or its states?

For example, I have an Idle state in MyStateMachine and I want to somehow get this state in the Event graph, something like MyStateMachine.Idle. Is it possible?

Not that I am aware, but you can set a boolean or similar in the state, and then grab that from the animation blueprint.

In blueprint the animation blueprint is got from “Get Anim Instance” IIRC.

You may also be interested to learn about AnimNotifies, which is a way to fire events from an animation sequence.

The base flow is you determine states in the character class. The Animation class gets a reference to the character class and reads the value of those states to use in the anim graph and its state machines.

Anything passed from anim bp to character bp is done so start of next frame.

thx for the response.

I’m aware of this pattern as this is pretty much how most of the tutorials i’ve watched suggest. but i’m trying to avoid this approach because of the duplication involved, knowing a lot of variables can be read directly. simply reading variables should be thread-safe, right?

Maybe my example wasn’t clear enough.

Suppose I have an anim blueprint, on my “Event Blueprint Update Animation” node, is it possible to as simply as print some info of the current state of a running state machine attached to that blueprint?

I am not sure about thread safety as I haven’t had to worry about it in my projects.

I’ll link this just in case it is helpful and you didn’t see it already:

you can get curve data.
Use the curve data to derive a state value.