Download

Help: Creating custom C++ input events for blueprint usage

Hello, guys.

I need to create custom input events in C++ that will show on blueprint as an input event node.

The custom event will communicate via socket with an external service. So instead of an event triggered by a keyboard key, it will be an event triggered by an specific message received by socket. And I need to make this invisible for people who will work with the blueprints while developing the gameplay. I need to give them the custom nodes so they can create the blueprints without worries about the code and socket stuff.

Example: I create a custom C++ event triggered by specific socket message that will show on blueprints as a “MyActionInputEvent” event node. Then, when the designers need to create an interaction in the level using blueprints, they will use my custom MyActionInputEvent node instead of any default event node (like ‘E’ key input) to trigger that interaction.

I have some knowledge on C++ (classes from college), but I know very little about UE4 programming.

I need some light here on the best way to implement that, so I can start looking for the right information about how to do it. So any kind of tip or opinion would be great here…

Thanks in advance.
(ps: sorry for my poor english :p)

Check into blueprintimplementableevents, although the e key would need to be assigned to a function to call your blueprintimplementableevent. At least thats what sounds like it would work i’d have to try it one day.

I’ll take a look into it, thanks for the tip =)