I am trying to have a laser light activate immediately on the owning client, and then have the new state secondarily sent to the server and replicated to all clients. However it seems when I call my RPC from within an interface function, it fails to run on the server.
The interface function as it is received inside the child actor. (Turns a light to visible immediately on the client, and then attempts to pass the new boolean state to the server so it can be replicated to all the other clients).
And finally the RepNotify which handles the new light state on all the clients EXCEPT the local one (where it is already handled instantly.
Am I doing something wrong? Is this a bug? Why am I not able to call an RPC from within an interface? I have also tried calling a non-RPC event from within the interface, and then off that new event calling the RPC but still no avail. Any ideas on what I can do?
Only prints “trying…” – i.e. the RPC won’t go through…
Does this have to do with ownership of the Child Actor Component or Child Actor? This blueprint is spawned via a Child Actor Component in my player character.
ive heard recently that there was a new recent change to deal with cheating. and rpcs can only be called via objects owned by the the player controller (or that chain back to it).
i don’t have 1st hand experience with it. but could be your issue.
I think you’re right. I set the owner of the Child Actor to be the Player Controller which is the parent of it, and it seems to have resolved the issue and the RPCs are calling again. Thanks.