How to replicate a function without player character?

To try and explain this clearly, I have a plugin for interaction and i need to call the function “Set Interaction Duration” on my interactable component.


The problem is however, i need to do this on the server, and since all of my players are clients, this would not really work. I have tried many finnicky solutions to this, but from what i understand, i apparently need the player character to do any Server RPCs, and getting the player is a bit odd as i get no real direct way to do it with the plugin.

The latest method i have tried involved in me getting the hovering interactor component, then setting it’s owner (hopefully the interacting player) to the interactable owner.


Once i needed to call the “Set Interaction Duration”, i made an event which casts to the player character (taking the interactables owner as the object) and then executing an event from the player.

This event would get the hovering interactable, then set the interaction duration from there.
The only problem with this is the “Hovering Interactable” is seen as “none” on the server, and even setting it as a variable on the server using another event didnt seem to work.

In short, since this is probably confusing, i just want to replicate a function (that being “Set Interaction Duration”) in an actor which preferably has little to no relation to the player.

I should mention that if i use Listen Server, the interaction works perfectly, but breaks when a client interacts with it.
Also in case its needed, the interaction plugin used is here

or a player controller

while you hover the target you can get a reference to it, then you can call the RPC on the player controller which calls the interface by reference.

1 Like

or owned by it.
you can have an actor (invisible) that acts as manager, replicated, always relevant, that’s owned by the controller and it can work as well.
afaik that works well. i’ve used it in the past (if i haven’t mixed any detail).