First off, I know clients can’t communicate to each other, they have to go via the server. But I’m having trouble making it work. For most things I can do it with a RPC, custom event>run on server>multicast… but it isn’t working in the case.
I am trying to (as client 1) tell client 2 to teleport and have client 1, 2 & the host see it happen.
So after clicking which player I want to affect and thus setting ‘affected player int’ I then click what I want to happen, in this case for that affected player to teleport
It works perfectly when the host does it, but not when the client does it. I’ve tried every method of trial and error involving switch has authority and tons of other code to get to this point, im pretty sure now its just a matter of overcoming the client to client via server thing, which i thought i was doing with the RPC… but apparently not.
Yeah, I know normally it should only be done on server, but im building some dev tools for debugging and I want to be able to do it as a client on another client, is it possible?
Trouble ive had with player controller is that each player sees the sequence differently,
for example:
Player0 - is self for all players
Player1 - for host = player1, for client = host
Player2 - for host = player2, for client = the other client
Making it complex and is why im getting the game state, player state, player id and passing that as the affected player and feeding it so there is some logic to who’s who
Is there a visual example somewhere of what you mean?
I’ve already tried casting to the host player character from client via get player character 1 (which is host) and executing the rpc from the hosts character but that didnt work and now that I type it out, of course it didnt work, the client sees a proxy of the host… right? So I need to do something with a rep notify… thats what you’re saying, ill try to consider how i can translate a repnotify to set world location (maybe via a bool that if true runs the code inside the rep notify and then sets it back to false when finished so it can happen again…) ?
I still think you are over complicating things by setting a world location manually on the clients. If you “Replicate Movement” it is handled when set by the server and you’re done.
Don’t flip a bool within rep notify? I don’t know where you are going with this.