Hello. Hope everyone is well. I’m facing an issue. The server can interact with the object to make it disappear but the client interacts and it goes through the interface up to the actual grid manager, but stops there so it cannot replicate these changes to anyone. The reason why it is happening is because the grid manager is an unowned actor, and therefore the RPC where it says Run On Server, won’t run. I was wondering if there are any solutions for this. I tried using player controller, and the game state, but it doesn’t seem to be working for me. Any solutions would be appreciated.
Hi, I tried this, but it doesn’t seem to work for both the client and the server now. Im trying to interact with an unowned object but only the server can and adding in that switch has authority makes it so neither the server, nor the client can interact.
You are making a RunOnOwningClient RPC on the client itself. This will just call the function on the client as a regular function call.
Then you make a Multicast RPC on a PlayerController. Each Client only have their own PlayerController so this will only be called on the respective client that own the PlayerController the Multicast is executed on.
In other words it is pointless to make a Multicast RPC on a PlayerController since it will not be any different than a RunOnOwner RPC.
Checking if SwitchHasAuthority on an Input event is also pretty much pointless since it is will block ListenServer input.
If you call RunOnServer on an Actor that you don’t own the RPC will be dropped and a warning will be printed in the log output.
The first part ensures that the client can actually interact and thats working fine above. The part where the issue starts when I try interacting with the unowned actor. For the interaction I tried lots of different ways, like setting owner (Which isn’t working as that command is server based), and just different setups of the code. The code iteslf is a procedural tile based map. When I click one of the tiles it should set its transform scale to 0 so that it can’t be seen. I’m using instances for it. Now I tried changing it where that piece of code runs on the game state, and even from the game state to the unowned actor but it doesn’t seem to work for me. I have tried a few solutions, If possible, would you be able to help out on a call if possible, Its fine if not, but still confused how I can interact with the unowned object from a client.