Possible bug with action events with multi-key triggers
I'm not sure if this is a bug or if this is intended, but here is the behavior I'm facing and how to reproduce it.
Step 1) From the Project Settings I made an action event called "MovementApplied", which is triggered by the keys W, S, A, D.
Step 2) Inside my player character I assigned the "Pressed" execution to increment an integer "Counter" and then print its value.
Step 3) Now I check the behavior through play testing. I press and hold "W", prints 1. While holding "W", I press "D", prints 2. While holding both, I press "A", prints 3.
Step 4) Now to "Released", I add a print statement, which says "Released".
Step 5) Now back to play testing. I press and hold "W", prints 1. While holding "W", I press "A". Prints nothing. I release "A" only, prints nothing. Press and release "D", nothing.
Step 6) Remove the execution pin from "Released", we're back to our position at step 2. If I play test, I get the same behavior as step 3.
Why do I not get any print statements from other key presses when I have something connected to "Released"? Is this a bug? Is this a normal behavior that I'm not understanding?
asked Nov 07 '17 at 07:16 PM in Bug Reports
As redbox stated you definitely need to use different implementation. The problem is the limitations with the 'MovementApplied' event. It will log the first key pressed and held from the input event when tied to the 'release' but it won't log any presses after. The better practice in this case would be to tie each key to a separate event that you want to actually use and log them. See the picture I'm attaching if that helps. You'll get the results you are looking for when calling W, A, S, and D individually instead of in one input event.
answered Nov 08 '17 at 02:25 PM
Trey Z ♦♦ STAFF
Its really old thing and its ok.
You should use some different implementation.
answered Nov 08 '17 at 07:50 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here