Download

How to get an instance of or a reference to a State Machine? UE4

Hi, I’m new to this posting thing so sorry if this ends up in the wrong thread.

I saw this once in a Youtube video I think but I am now unable to find it anywhere, even Google.

Basically, what I want to do is blend a simple animation to a base animation using Layered blend by bone. That all works dandy n fine.
I wanted to make sure when my simple animation is active, it should be overlaid over any other animation that is playing through the state machine.

First image is the initial setup I was using to layer my animation over the basic Idle pose, but when state machine switched to jumping, the basic animation would cease to play, which is obvious as it is only being blended in the idle state.

Second image is how I plugged the basic animation to the output of the default state machine and it works splendidly, the simple animation being blended with each state; idle, run, jump, etc.

However, when I try to add a conditional blend to allow a variable to switch the simple anim on and off, I can only drag the default state machine pin to either blend with my simple anim or plug into the conditional branch.

I can copy paste the state machine but I think it would take up more memory as I would have two separate objects.

So what I’m trying to do is get an instance or reference to the original state machine so i can plug that into the blend and make things work with a single state machine.
I was it being done but it was a long time ago and I can’t find the video.

Sorry if I over explained a relatively simple problem.