Download

Another Blueprint is not able to set variable in AnimBlueprint

Hey guys,

i want to build a trigger box, which set a variable in an AnimBlueprint so that the state machine round can start. When the player goes into the trigger box - the fox should fall asleep (s. attachment).

If i set the variable manually or behind the speed directly in the AnimBlueprint - it’s working - the fox is going to sleep. But it should be possible to wake him up.

If i’m using the trigger box + cast - it’s not working - nothing happens. The cast is working (tested with custom event + print string) and the sleep? variable is editable… Where is my mistake?

Thank you very much!
Timo

anim_bp.PNG

maybe the animstate still just work in 1 direction? I dunno cos you dont show the animgraph, so I am guessing so after sleep false to true it’s animate, but from true to false it’s not

That’s my state machine plus transitions. GoToRest and RestToGetBackUp are just interim animations for a smooth transition.
statemachine.PNG

I figured out that the AnimBlueprint always sets the variable back to Defaul Value:

Yellow-Print: Get Sleep? -> Print -> from AnimBlueprint
Blue-Print: Set Sleep?: true -> Print -> from the **Blueprint **(BP_AnimTrigger)

variable_set_print.PNG.jpg

What can i do to avoid this?