So from the Wiki Example, maybe it would be easier if I just add some comments in there to explain!
void AYourPlayerController::SetSomeBool(bool bNewSomeBool)
{
// Change the value of the bSomeBool property
bSomeBool = bNewSomeBool;
// If this next check succeeds, we are *not* the authority, meaning we are a network client.
// In this case we also want to call the server function to tell it to change the bSomeBool property as well.
if (Role < ROLE_Authority)
{
ServerSetSomeBool(bNewSomeBool);
}
}
void AYourPlayerController::ServerSetSomeBool_Implementation(bool bNewSomeBool)
{
// This function is only called on the server (where Role == ROLE_Authority), called over the network by clients.
// We need to call SetSomeBool() to actually change the value of the bool now!
// Inside that function, Role == ROLE_Authority, so it won't try to call ServerSetSomeBool() again.
SetSomeBool(bNewSomeBool);
}
Hopefully that clears things up! I’ll go edit the Wiki as well!
P.S. - In this example there is an implicit assumption that only the client is triggering a change in the bool value, since there is no way for the server to send the value to clients.