Adding custom interactions

How to add custom interactions to your game

How to add custom interactions

Adding custom interactions is quite simple. First you need to create a child of the Interaction_BP and use the Interact event to add interaction logic.

To create custom interactions, you can reference the examples in:

šŸ“‚ /Game/TPSKit/Blueprints/Modules/InteractionSystem/Examples/

These interactions all inherit the Interaction_BP found in:

šŸ“‚ /Game/TPSKit/Blueprints/Modules/InteractionSystem/Blueprints/Interaction_BP

Creating interactions

To get started, navigate to the location of the Interaction_BP shown above. Right-click and select Create Child Blueprint Class to create a new interaction. Once, created, open this blueprint and in the Class Defaults, select the interaction type:

For holding interactions, you'll need to update the interaction's UI widget. This can be the included example widgets or your own custom widget.

On BeginPlay, use the Get Interaction Progress function to get the percentage of the hold input, then use the Interaction BPI to call the Update Hold Progress which should update that value in your UI widget.

To change the UI widget, you can change the class on the Indicator and InteractionUI components in the interaction's blueprint. These components are self-explanatory. The classes can be changed to your own custom UI widget.

Finally, to control what happens during the interaction, use the Interact event included in the interaction blueprint.