Enhanced Input OnPressed

Hi I’m pretty new to Unreal Engine and I’m struggling with this pretty simple concept that I just can’t understand. Basically I’m using Enhanced input right now and I cannot figure out how to link a InputAction to a boolean var instead of a function. I basically just want to be able to have a boolean switch connected to an input key so that it is only on when the button is pressed. I understand that I could just make On, Off functions or add one of those isKeyPressed() functions but I want to do this in the PlayerController class using EnhancedInput’s capabilities. So is this possible with EnhancedInput or should I just make use of the regular engine functions?

If you’d like to see a great implementation of EnhancedInput I recommend you download the Lyra project. It makes use of gameplay tags and if you look at how the grenade was implemented it should help you solve your scenario.

Apart from that the team put together a really amazing starting point for any game, there is a lot to learn and understand but I believe it is worth the investment considering all the great functionality you will gain.

1 Like