The new enhanced input is not working as expected and I’m on 5.02. I added a new Input Action and added both Pressed and Released Triggers. When I create the event graph below it fires twice. The “start” print screen happens when I press it down and then again when I release it. The Released key print string does fire when I let go of the key though. I would expect it to only fire the “start” print screen once.
Using the old input setup, I had a ‘start shooting’ function running when the key was pressed and when released it would run a ‘stop shooting’ function
Am I correct that this is a bug, or is there a different Trigger and setup I should be selecting to get what I am expecting?
I ran into the same issue. I think it qualifies as a bug.
There is a workaround: I noticed that ‘Triggered’ and ‘Started’ fire during the ‘Pressed’ phase. Even though it is listed as (Unsupported), I am using ‘Started’ to initiate the action and ‘Completed’ to terminate the action.
It appears that the ‘Triggered’ pin fires for both Started and Completed.
Now that I think about it, I don’t think it’s a bug. I think I am meant to create a new action for release trigger. As an alternative to not have so many buttons to map, I simply used a “Do once” node which stops it from playing twice. Once complete you can reset the do once.
I know this is an old thread, but it came up when I was looking for how to properly setup this type of “Press / Release” with the new Enhanced Input system. So I thought I should post the answer I found for future searchers.
I believe this is a clean method for doing this:
In your Input Action, set your Value Type to Digital (bool) and add 2 Triggers, one for “Pressed” and one for “Released”.
In your Event Graph, use the “Triggered” pin, followed by a Branch on the “Action Value” pin. “Action Value” will be true when the button is pressed and false when it is released.
This works for mouse, keyboard, and/or controller buttons (as set up in your IMC). Hopefully someone finds this info useful
Credit to Alex Quevillon who shows this in the below tutorial video at 23:16
Bonus: in the video, he also covers how to read a value to determine which keyboard key was pressed, if that’s something you want.
this is the answer and fixed my sprinting set up to not conflict with crouching so I don’t know why it hasn’t been marked as the answer I would mark it as the answer if I knew how