I’m pretty new to Unreal so I’m sure one is a no-brainer for most of you. I’m really close to achieving my simple goal of triggering an animation with keyboard input but I’ve been stuck on last step for about 2 days now.
I have an animated character in my scene, a creature on a tree, and my goal is to have him climb up the tree by pressing “W”. All the animations are in place, my animation_BP is all set up and it works. I have a Bool var driving the climbing animation (isClimbing), so when I set “isClimbing” to true the character climbs up the tree upon starting the game, whereas I want him to begin climbing once I press “W”. I have a gameMode BP pointing to my character as the default pawn as well.
In the Character BP I’ve set up the proper input key to switch a bool var (“climbing”) to switch on the “isClimbing” bool in the Anim_BP by casting the Char_BP “climbing” bool into the Anim_BP. Upon compiling I get no errors.
However when I play the game the character remains idle and the button input does nothing. When looking at the Char_BP while playing I press “W” nothing happens within the connections between the nodes.
Not sure what I’m doing wrong - it’s one of those things that seem simple but takes days to resolve (without help). And advice would be greatly appreciated!!
In the Character BP I’ve set up the proper input key to switch a bool var (“climbing”) to switch on the “isClimbing” bool in the Anim_BP by casting the Char_BP “climbing” bool into the Anim_BP. Upon compiling I get no errors.
[/QUOTE]
Do you mean you’re casting your Char_BP to an Anim_BP with a “Cast To” node? Unless the Anim_BP is a child of the Char_BP I wouldn’t expect that to work. You can check if the cast is failing by dragging off of the cast failed exec pin and drawing some debug to the screen somewhere.
Sorry if I misunderstood - a screenshot of that part of the player BP would be helpful
I’ve included both Blueprints - the Character and the Animation. I’m trying to use the “climbing” bool var in my character BP to drive the “isClimbing” bool var in my animation BP with a keyboard input. As of moment I am not aware of how to change the property of a bool var within an anim_bp from a Character BP. Is there another way I should be going about ?
No worries, glad to help. I would check out that link I posted though, and see if you can understand it. I started to sum it up, but the link has nice pictures and everything. Let us know how it goes, and if you need more direction
Edit: I completely misread your graph! saves the day later!
Now everything is set up correctly, but I’m still not getting any recognition that I’m pressing keys. While playing the game and looking at the blueprint nothing is firing off between the nodes. Is there another step to allow for player input recognition??
Try : do a right click into the charbp - type in “1” at the search bar - add the input pressed 1 node - try it out. After that we will know if it is a problem with the action or the event
Hey - I implemented your idea and I got a strange result. If I start the game from the main unreal editor window the input does not work. But if press “play” within the char_BP or the Anim_BP windows the input works face palm
What is the difference with opening up the game in the main editor from the Char_BP window?
Hey guys I figured it out - I knew it was ridiculously simple… I had to click on the screen to take allow input to take control, a weird step but necessary. A couple of days down the drain because of a simple mouse click haha