Multicast not replicating on ListenServer Character

I’m trying to set team color for the character As soon as either it gets possessed or as soon as the GameState on the Listen server is available.

The character in question is actually controlled by the ListenServer owner , i.e the player on the listen server.

Calling a multicast SetColor on this guy causes its colour to change on the Listen server but not on its clients, while every other client gets its color changed both on client and server.

However putting a little delay before calling SetColor on ListenServer player gives intended behaviour but thats a workaround of some sort.

to differentiate between player controller of listen server player vs the connected client I’m using this logic

for (TActorIterator<PlayerController> ControlItr(GetWorld()); ControlItr; ++ControlItr)
			if (this == ControlItr->PlayerState&&ControlItr->IsLocalPlayerController())
{
SetTeamColor();
}

Am I doing something wrong?

Hey Commander Shepard-

I just wanted to clarify, when you change the character’s color it will change for the server but not the clients? When the client’s color changes it DOES change for both the server as well as other clients, is that correct? Just checking, is the property you’re using for the color set to replicate? Also, when is the call to SetColor being made? Is this on BeginPlay() or in the character constructor or somewhere else?

Cheers

Yeah, sorry.

I realized that I was using replicated functions at wrong place on wrong actors that was leading to multiple Race conditions.

Such calling stuff on begin play of one actor assuming other would have spawned and stuff.

Please close this question if you wish