I am making my first animation blueprint state machine, but I’ve gotten stuck trying to make a transition work using a simple boolean. Allow me to explain my setup:
In my character blueprint, I check for input and then set the boolean based on it. I’ve hooked it up to a print, and it does work, returning true when pressed and false when released.
Next, in my animation blueprint’s even graph, I have a long set of checks being done. They stem from a “Event Blueprint Update Animation” node, the relevant part here is the one in the image, where we grab our character blueprint (using “Try Get Pawn Owner” then “Cast to (blueprint name)”), check the boolean it has and then copy it in the animation blueprint (this is for optimization, to avoid calling our character BP too much). The crouching boolean setting part always happens, as what comes before is an entirely linear set of notes (the one before, which branches, has both branches leading to our crouch boolean being set, so no worries there either).
Finally, we get to the state machine. All “grounded” states like being idle or walking can lead to the crouching state. Getting in is as easy as “Crouching == True” and getting out works the other way round.
However, no matter what I do, it seems like I am unable to enter the crouching state. All other states work (except running, but I haven’t really started working on that one).
What am I doing wrong? I’ve watched quite a few tutorials and I can’t seem to figure it out. If it matters, this is a multiplayer game. Currently, I have two clients.
Thank you very much for any reply!
If it also helps, here is the rest of my animation blueprint:
Fortunately (or unfortunately, since it makes me look a little foolish), the state machine is now working as expected. Nothing has changed since I made the post, so I can only assume that restarting my PC somehow fixed the problem. I’m used to this happening with in-house engines I’ve worked with before, but I suppose it must have caught me off-guard with Unreal, since I didn’t think to restart my machine before making this post. Either way, the issue this post is about has now been resolved.
Unfortunately, however, I can’t seem to get the animation (a blendspace) within the crouching state to play. I’m attaching a gif to this comment to better illustrate the issue. Apologies for the low frame rate.
Of course, a one minute gif can be overwhelming, so here are some screenshots to use as reference too. Anything to help me resolve the issue.
As shown in the gif, I am indeed now miraculously capable of entering, staying at, and exiting the crouching state. But the blendspace connected to the result node inside the state itself does not play, it instead behaves as if the character is outside the crouching state. The crouching blendspace is from the starter animation kit, and as shown at the end of the gif, there is no animation within that blendspace where the character is standing up, which means that the game is somehow displaying an entirely different animation from the one the state machine is providing it.
Again, I apologize for the prior issue in this post having turned out to be nothing more than the need to restart my PC. I’ve made sure to restart my PC several times before writing this reply.
Thank you for your reply, I hope you’ll be able to help me with this follow-up issue too.
Since this is a different problem, go ahead and make a new thread and mark this one completed! That way someone with the second problem will be able to find it on the forums and hopefully be able to resolve their issue- because the blendspace issue won’t show up in a search if someone is looking and it’s on this thread! BUT I would be MORE than happy to jump at it when it appears! You can tag me as well, so I know right away.