Problem in Triggering an Animation from the Event Graph of the State Machine

Hi. I’m very new so probably I’m just making a really dumb error but please, help me anyway.

I’m making a top view mouse only game.
I want that my player character automatically starts mining when near enough his objective (the object that the player clicked) and stops when the player changes objective or the character ger further from it.
Here what I did so far:


The variable “MinDistanceFromObjective” is static, so it works by default.
The variables “DistanceFromObjective” and “IsObjectiveMineable” both works and are set correctly.
Also, I’m 100% sure that I tested near enough an objective that the character recognized as mineable.
The Animation State Machine should work fine too.

My problem is that I attached this to “Event BlueprintUpdateAnimation” but it gets stuck on Validate Get Character (so at the begging) and never goes to my part of the blueprint.
If I try to bypass the validate, both casts in my code don’t work.
What am I doing wrong?

The rest of the blueprint in the Event Graph should be all default code.
And, also, yes, I should be casting to the correct blueprints.

I suppose or I’m understanding something from about the “Character” variable and the owning actor, or I’m using wrongly the casts.
Hoping that you can enlight me and my mistakes.
Thank you.

All of your state logic needs to be in the character class. It determines mineable etc and sets a state that the animation class will use to trigger state machine transitions.

Your Animation class Event Graph should start by creating a reference to the character and movement component (where applicable). These references will be used by the class to pull in the state values from the character class.