# Custom Interaction system

The plugin does come with an extremely basic interaction system, which is designed to be replaced. This page covers how to replace it.


# 2.7 and above:

Simply replace the PreInteract, StartInteract and EndInteract with your own interaction functions inside BP_ItemActor and BP_Interactable. All three functions are inside BPI_Interact, which can be found in the plugins demo folder and removed once these three functions are replaced.


# 2.6 and below:

  • There are two functions, StartInteract and FinishInteract. The first will send an RPC to the server, then the server will send the client any data around the component the client needs, then trigger AC_Inventory -> OnDataReceivedFromOtherComponent, which will call FinishInteract.
    This is handled in this way because allowing players to interact with the actors component before replication is finished can lead to a lot of bugs. Not because there are issues in the plugin, but because of the nature of clients modifying an actor that isn't in sync. Virtually every multiplayer game handles it in this way unless they have client prediction and network rollback.
    This is the only "gotcha" that needs to be kept in mind. In general, you should already not be allowing players to interact with actors that are waiting on an RPC.

With the above point in mind, you can start replacing all the functions with your own. The only ones that other systems rely on are GetAnimationData and UpdatePreview.


# Color Sheet:

functions - Variable - category - class