Hi. I have a problem. I have an actor blueprint in the scene, called Flower Blueprint.
Around that mesh, there is a collision box. When player enter that box, ,Is Player Close" variable is set to true, and input for that blueprint is enabled. When he exits the box, the variable is set to false.
If the variable is true and F key is pressed, then the flower light visibility is set to false, so it is not seen anymore.
Now what I’m trying to do is if I press F and , Is player close variable" is true, the character should play a picking up animation, and after that the flower light becomes invisible. Also, the character does not get frozen at the end, and Locomotion state blends back at the end of picking up . The input is also disabled, so while animation runs, the character cannot move.
Now the question is- how to bring , Is Player Close" variable into the character’s state machine in order to play picking up animation ?
Casting First Try
In the actor blueprint, I have tried to cast to character blueprint so it could play an animation. At first, it worked, but character froze at the end. After I changed the ,Play animation node’’ with a ,play montage’’ one, and put the animation into an animation montage, then changed back to a ,play animation node’’, it isn’t working anymore.
Casting Second Try
In the second try, I have tried to go the state machine route. Inside EventGraph, have tried to cast to the actor blueprint, so I could get , Is player close" variable from there, to make it available inside the state machine. I don’t know what object to link for this to work.
The character general set-up is similar to the default one.
How could I solve this problem. Could you help me please ?