ACharacter::JumpMaxCount
#include "GameFramework/Character.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWriteReplicated
Description
The maximum number of jumps the character can perform before needing to land. Set to 1 (default) for standard single-jump. Set to 2 or more to enable multi-jump (double-jump, triple-jump, etc.).
Caveats & Gotchas
- • If `JumpMaxHoldTime` is non-zero and `StopJumping()` is never called, the player can jump again immediately after the hold window expires without landing, potentially exceeding the intended jump count. Always pair multi-jump with proper `StopJumping()` bindings.
- • This property is replicated. Change it on the server to affect all clients. Changing it only on the owning client may result in desync where the client allows a jump the server rejects.
- • `JumpCurrentCount` is reset in `OnMovementModeChanged` when the character lands. If you change movement mode programmatically without landing (e.g. teleporting onto a surface), `JumpCurrentCount` may not reset correctly — call `ResetJumpState()` manually in that case.
Signature
UPROPERTY(EditAnywhere, BlueprintReadWrite, Replicated, Category=Character)
int32 JumpMaxCount Examples
Enable double-jump by setting Jump Max Count on the player character
Blueprint
Enable double-jump in the constructor C++
AMyCharacter::AMyCharacter()
{
JumpMaxCount = 2; // Allow one air jump after the initial jump
} Tags
Version History
Introduced in: 4.9
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?