Opening and closing things with the same key

Hey guys, this is a two part question, i’m very new to unreal and consider myself a novice with no knowledge but very eager to learn, I’ve been using tutorials to accomplish something, but one thing i can’t seem to find is for example, if I’m making an RPG and i open lets say my skill tree with K, how do i then close it again with K.

My second question would be quite similar, but with a little twist, i want to bind walk to the R button on my keyboard, but i don’t want to use press/release node, i want to be able to press R once and my character would permanently walk without me needing to hold R, and then press R again to make my character go back to it’s original running speed.

First question: use a FlipFlop node. Flow Control | Unreal Engine Documentation

Second question: the way I would do it would be to bind R to an input action, then have it change a Boolean variable with a FlipFlop node. Then, in Event Tick, place a Branch, check the Boolean variable, and if it’s true, use Add Movement Input to move the character.


instead of using all of those nodes, i did the same thing for the second problem, i just used a flip flop node and it seems to work perfectly, i press R once, it starts to walk, i press R again and my character begins to run, would there be any repercussions to keeping the node blueprint like this?

Oh, if all you wanted to do was change between walking and running, then no, there shouldn’t be any problems! Although I’d recommend maybe changing R to be an Action Mapping (you can set those in Project Settings), if you think you might ever need to change what key is assigned to that functionality. Otherwise, your solution should work perfectly.