I’m not actually sure how to word this one, But what I’m trying to do is grab the clients version of a player controller from a specific server player controller.
For an example lets just say we have Player 1 and Player 2
Player 1 has these two controllers:
Player 2 has these two controllers:
The clients can of course only see the client controllers, and the server the server controllers.
Now the controllers for each respective player have to be connected in someway, I’m trying to find out how to get for example, ClientPlayerController2 from ServerPlayerController2
It’s a bit confusing I know, but the main reason I need it, is because the method for attaching armor in my game to players, does not seem to be replicating to the client as it should.
I tried two difference methods but both had the same result.
I tried a “Run on Server” Replication event which ran into a “Multicast” Replication event which equipped the armor, and it worked to a degree. The server could see the armor attached on the client(s) and itself. But the client could only see armor attached to itself, the server and other clients armor would simply fall off.
I tried having a “RepNotify” variable which was a reference to the armor actor I equipped. And of course when I changed the value of that variable it ran the equip armor code. But the thing was I got the exact same result, which was that Client could see only themselves with armor on, whilst the server could see everybodies armor.
This is due to the code trying to attach the armor to ServerPlayerController instead of the clients controller. I assumed multicast would work as it’s running on all the clients controllers as well, but it still seemed to only grab the servers controller.
Now I’m thinking that if there’s a way to just grab the ClientsPlayerController from a servers one, I could just attach it to that, so when I do a multicast, the code will only ever attach to the ClientsPlayerControllers. That way it’s guaranteed the clients can see the armor on each other.
If this doesn’t make any sense, Lemme know and I will try and clear it up. Maybe it’s not even possible, but this is the only way I can think of doing it.
Any and all help is appreciated