I’m not sure if I’m doing something wrong here or my specific project is playing hard to get. But whenever I use server travel and override the Copy Properties method everything works smoothly and my variables are passed over. However the issue I’m having is, this process is only happening for the server and the clients variables are not being copied over. I’ve pasted my copy properties code below and there is a debug to find out if the method is being called for the clients.
void ABPS::CopyProperties(APlayerState * PlayerState)
{
Super::CopyProperties(PlayerState);
if (Role == ROLE_Authority)
{
GEngine->AddOnScreenDebugMessage(5, 2.0f, FColor::Red, "ServerCall");
}
if (Role != ROLE_Authority)
{
GEngine->AddOnScreenDebugMessage(5, 2.0f, FColor::Red, "ClientCall");
}
ABPS* OldPS = Cast<ABPS>(PlayerState);
if (OldPS)
{
OldPS->BPName = BPName;
}
}
void ABPS::OverrideWith(APlayerState * PlayerState)
{
Super::OverrideWith(PlayerState);
ABPS* OldPS = Cast<ABPS>(PlayerState);
if (OldPS)
{
OldPS->BPName = BPName;
}
}
void ABPS::SeamlessTravelTo(APlayerState * PlayerState)
{
Super::SeamlessTravelTo(PlayerState);
}
I’m using ServerTravel and I have a transition map as well as my game-mode has it’s bUseSeamlessTravel = true;.
Everything works the way it’s meant to for the server but not for the clients.