Hello 
I a bit late following the tutorial, but there's something I'm having some trouble to understand.
When creating a FPS Template for C++, the default Jump binding is:
And inspecting these functions, I find this code:
Your code is far more complex. I'll copy and paste here, in case someone else, in future, have trouble understanding it:
and
Apparently, the default jump from UE4 works, without the need to replicate the bPressedJump boolean to clients.
This is where confusion starts. Why make it in such different way?
Are there any advantages?
And... Is there a reason why there's no (at least not explicit) replication of bPressedJump boolean on UE4 default code?
Thank you in advance!

I a bit late following the tutorial, but there's something I'm having some trouble to understand.
When creating a FPS Template for C++, the default Jump binding is:
Code:
InputComponent->BindAction("Jump", IE_Pressed, this, &ACharacter::Jump); InputComponent->BindAction("Jump", IE_Released, this, &ACharacter::StopJumping);
Code:
void ACharacter::Jump() { bPressedJump = true; JumpKeyHoldTime = 0.0f; } void ACharacter::StopJumping() { bPressedJump = false; JumpKeyHoldTime = 0.0f; }
Code:
void ASCharacter::OnStartJump() { bPressedJump = true; SetIsJumping(true); } void ASCharacter::OnStopJump() { bPressedJump = false; } bool ASCharacter::IsInitiatedJump() const { return bIsJumping; } void ASCharacter::SetIsJumping(bool NewJumping) { bIsJumping = NewJumping; if (Role < ROLE_Authority) { ServerSetIsJumping(NewJumping); } } void ASCharacter::OnLanded(const FHitResult& Hit) { Super::OnLanded(Hit); SetIsJumping(false); } void ASCharacter::ServerSetIsJumping_Implementation(bool NewJumping) { SetIsJumping(NewJumping); } bool ASCharacter::ServerSetIsJumping_Validate(bool NewJumping) { return true; }
Code:
void ASCharacter::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const { Super::GetLifetimeReplicatedProps(OutLifetimeProps); // Removed some unrelated code here DOREPLIFETIME_CONDITION(ASCharacter, bIsJumping, COND_SkipOwner); }
This is where confusion starts. Why make it in such different way?
Are there any advantages?
And... Is there a reason why there's no (at least not explicit) replication of bPressedJump boolean on UE4 default code?
Thank you in advance!
Comment