How can I shorten this if statement?

Is there any way i can shorten this?

also the normal

292821-ex.png

doesnt work.
Pretty much what i’m trying to do here is convert key press into a string. Does anyone have any ideas as to how i could shorten this?

What you can just do is one of these options:

  1. Inputaction | KEY
    With this you will need to create some inputactions in the Project Settings.Make them, spawn the node in the BP editor and set the value corresponding the key.

  2. Use the method that is “not working”

Now this si basically the same but instead of using input modes you use these keys. Then “OnPressed” will need to set the value, or break down the key. Make sure you are posessing the pAYER CHARACTER

You can skip the switch if you do not care about a key-specific action:

or this:

Many other ways, too, depending on what the end result is supposed to be used for.

any key isnt working

nvm i retardo