Download

Disable input for every key except one.

Hello, I want to ask how can i disable all keys except (in my case) “W” key. I want to enable only W key for a couple of seconds then disable all except “T” key.
In other words disable all input except one key.
Thanks

Either enumerator that says which key is enabled, or bunch of boolean variables. Then you is if enumerator == “W enabled” or you just check if boolean variable (for eg. IsWEnabled) is TRUE.

Generally variables (that you set to some values) then checking if variable has right value then deciding with branch if you let or not execution to go trough

One way you could do that is having an extra Actor that only has the W Key in it.
When you want the W key active only, you would call “Disable Input” on the actors that currently have Input (probably Character/PlayerController),
spawn this custom W Actor and enable input on him.

That Actor would do what ever you want him to do and after x seconds you destroy him again and enable input on your regular Actors.