Hello, I’m super new to UE4 and have been stuck for a day or two on this issue. I already have it so that my character can walk around using WASD, and jump using Space Bar. How can I create a separate set of animations to play when I press Q? For example, my animations when I’m normally moving or idleing are an idlewalkrun blendspace. When I press q, I want to use a separate blend space with different idle, walk, and run animations. How can I do this in blueprint??
Are you toggling, or holding down the Q key? Either way, you add a boolean flag, which changes on the Q keypress event, and depending on whether it is true or false, you draw a line down to a separate blendspace. (The usual reason for this is moving while crouched).
Thanks for the response. Do you think you could show an example of this in the animgraph? Sorry, very new in this stuff.
Hey,
Wasn’t sure on your familiarity with BP or Animgraph so put together a quick 3 step screenshot. Let me know if you need any clarification. (Images attached)
Thanks for the help! Can you let me know what I’m doing wrong here? and what I should do with my Event Graph in the last picture?
So you see how in my screenshot, I have that extra node in the event graph called Event blueprint initialize animation? You need to call that event in the same place, and do a Try get pawn owner, cast that to your specific character blueprint name, and then set a variable in the animgraph of that same type, called character reference. Then you need to set the AnimQIsPressed to the character’s Q is pressed.
Just copy my graph more or less, for the first event, and then add the AnimQisPressed part of my graph to the end of your event blueprint update animation. Your animgraph needs a variable of type “your specific character class” object
Yeah man I really appreciate everything thanks for putting up with my questions lol, but I honestly have no idea where your “CustomCharacter” variable came from in your event graph and just pretty confused all around. The first two steps were pretty intuitive to me and I’m sure the last one is too, but I’m just completely unfamiliar.
Probably the only way I’m gonna learn this is from some video that I haven’t found yet. Honestly if you have a paypal or something I could send you like 5$ if in any way you could create a video for me. Thanks for all your help.
Hey, sorry I’m not very good at checking these forums over the weekend.
So let me just break it down. Every blueprint you create is a class. Your character blueprint is a class, and you’ve probably extended it from the “Character” or “Pawn” class. Your character blueprint has the event graph that holds the input that says “QisPressed”. Inside the animation blueprint, you need to make a variable called CustomCharacter (or whatever you want). This variable needs to be of the TYPE “Your character blueprint name” (object) So if you are using the FirstPersonCharacter blueprint, it should be a variable of “FirstPersonCharacter” type. The same goes for the cast node that I use. I am specifically casting to my CustomCharacter class, but you should be casting to the name of whatever your character blueprint is called. So if your character is called FirstPersonCharacter, you should be Casting to First Person Character.
let me know if its still unclear, i can maybe make a short video tonight