Interactables

Interactables are driven by BPC_N00dInteractable. You can either child the interactable actors that have this already implemented for you, or you may add this component to your own actors to create the interact functionality.

Since the examples that are included in the plugin are childed from the included base BP_N00dInteract actor, we will go ahead and implement the component on the engine's Actor class. If you want to get moving immediately, just child or copy across any of the examples that are ready to go. This guide will show how those were setup.

Base

This is an abstract class from which all interactables will inherit from.

Create a child of BPC_N00dInteractable and move it into n00dInteractExample

In your n00dInteractExample folder, create a new Actor class and call it BP_InteractableBase

Open it up and add BPC_Interactable to the components window

Call ConstructInteractable on the Construction Script and right click on each of the inputs to create a parameter for each

Click to expose the "Eye" to make these instance editable

You will now have these class defaults in your base actor

Make sure Replicates is flagged True

Overlap

This actor responds to overlaps and can be added as a child actor component to your interactables or used directly within the world.

Create a child of BP_InteractableBase and call it BP_InteractableOverlapBase

Open it up and add a Box Collision to the components window

Rename it Proxy

Right-click on the box component and select Add OnComponentBeginOverlap and OnComponentEndOverlap

On the Event Graph, call ProxyBeginOverlap and ProxyEndOverlap

In the construction script, call SetBoxExtent on the proxy component and ConstructOverlapInteractable on the interactable component. Create the highlighted nodes in thiis image by promoting to variable

Make both of these instance interactable

Set the value to 32 for x,y,z

Respondent

This class responds to interacts indirectly to the player interaction, for example a door that opens by a switch (BP_InteractableBase) or from an overlap (BP_InteractableOverlapBase)

Create another child of BP_InteractableBase and call it BP_InteractableRespondentBase

Open it and click on BPC_Interactable and in its Class Defaults flag Respondent to True

We now have all the base actors we need to start interacting. Next page will create examples from these actors.