[Multiple gates for hotkey'd buttons] There has to be a better way to do this...

Hi all, I am fairly new to UE - I have been doing a bit of blueprint scripting and I feel like when it comes to doing repetitive actions - blueprints can be a bit tricky at times.

I’m currently using the gate flow control to check for inputs, but I have 20 hotkey-able slots. I couldn’t find a way to do with loops since gates can’t be stored as a type.

As a result I resorted to copying and pasting the code 19 additional times. I feel like if this was done in C++ I wouldn’t have to copy and paste it so many and times… (can’t say for sure).

Is there a better way around this? Or is this as good as it gets on blueprints. TY in advance!

What effect are you trying to achieve here. I don’t mean code wise, I mean in the game?

Why not just have a lot of input actions defined?

I have 20 buttons that the user can change the hotkey if they wanted to.

Each sequence in that picture has a flow gate to control whether the button should go off (is button down or up).

A lot of the stuff is just to check if the key pressed / released is the user defined hot key (+ shift | alt | cmd allowed … etc)

Ok, I get it. But what’s wrong with input events? ( defined in project settings )