RealDocs

ACharacter::JumpCurrentCountPreJump

property Engine Blueprint Since 4.20
#include "GameFramework/Character.h"
Access: public Specifiers: UPROPERTYVisibleInstanceOnlyBlueprintReadOnly

Description

Stores the value of `JumpCurrentCount` captured at the start of `CheckJumpInput`, before that function potentially increments the counter. Used by `SetMoveFor` and `PrepMoveFor` in the network move system to correctly reconstruct jump state during client-side move replay.

Caveats & Gotchas

  • This property exists solely to support the network prediction system. In `CheckJumpInput`, `JumpCurrentCount` is modified, but `SetMoveFor` and `PrepMoveFor` need the pre-modification count to save and restore moves correctly. Do not use this value for gameplay logic — read `JumpCurrentCount` instead.
  • If you override `CheckJumpInput` and do not call `Super::`, you must manually set `JumpCurrentCountPreJump = JumpCurrentCount` at the very beginning of your override, before any modifications to `JumpCurrentCount`.
  • Not replicated. Like `JumpCurrentCount`, this is a locally-maintained prediction variable and is meaningless on simulated proxies.

Signature

UPROPERTY(VisibleInstanceOnly, BlueprintReadOnly, Category = Character)
int32 JumpCurrentCountPreJump

Example

Correctly capture pre-jump count in a CheckJumpInput override C++
void AMyCharacter::CheckJumpInput(float DeltaTime)
{
	// Capture count BEFORE Super modifies JumpCurrentCount
	JumpCurrentCountPreJump = JumpCurrentCount;

	Super::CheckJumpInput(DeltaTime);

	// Custom post-jump logic here, using JumpCurrentCount for the new value
}

Version History

Introduced in: 4.20

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.