I am trying to learn replication and i keep getting these weird errors, i have no idea what they mean.
What i am trying to achieve is all clients have separate health to each other, once one of the clients reach 0 health their actor will be destroyed.
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Replicated, Category = Gameplay)
int32 PlayerHealth;
UFUNCTION(Server, Reliable, WithValidation)
void CheckPlayerHealth();
virtual void CheckPlayerHealth_Implementation();
virtual bool CheckPlayerHealth_Validate();
void AReplicationTestingCharacter::CheckPlayerHealth() {
PlayerHealth -= 5;
}
void AReplicationTestingCharacter::CheckPlayerHealth_Implementation() {
if(PlayerHealth <= 0) {
Destroy();
}
}
bool AReplicationTestingCharacter::CheckPlayerHealth_Validate() {
return true;
}