Disclaimer: I’m an unreal noob. Thanks in advance for any help!
I have a project that is coming together nicely, but I’m stuck again.
Dedicated server - working
Clients connect and authenticate - working
Map changes and clients follow - working
Pickup item on level to win the game - problem. Not calling the server function.
I built my pickup item based on the coin tutorial video.
In this case, the server knows about the pickup item, and I see the BP debug messages in my server console. I just want the server to execute a function.
MMDEMO1Character.h
UFUNCTION(BlueprintCallable, Category = "LEET", Server, Reliable, WithValidation)
void GetWinnerInfo( const int32& playerID);
UFUNCTION(BlueprintCallable, Category = "LEET", Client, Reliable)
void SendWinnerInfo(const int32& playerID);
MMDEMO1Character.cpp
void AMMDEMO1Character::GetWinnerInfo_Implementation(const int& playerID)
{
UE_LOG(LogTemp, Log, TEXT("[LEET] AMMDEMO1Character GetWinnerInfo"));
SendWinnerInfo( playerID);
UMyGameInstance* TheGameInstance = Cast<UMyGameInstance>(GetWorld()->GetGameInstance());
//TheGameInstance->AuthorizePlayer(PlatformID, MatchKey, playerID);
}
bool AMMDEMO1Character::GetWinnerInfo_Validate(const int32& playerID)
{
UE_LOG(LogTemp, Log, TEXT("[LEET] AMMDEMO1Character::GetWinnerInfo_Validate Validate"));
return true;
}
void AMMDEMO1Character::SendWinnerInfo_Implementation(const int32& playerID)
{
// do stuff on client here
UE_LOG(LogTemp, Log, TEXT("[LEET] AMMDEMO1Character::SendWinnerInfo_Implementation"));
}
BP