RealDocs

ACharacter::MovementModeChangedDelegate

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

Description

Multicast delegate broadcast whenever the character's movement mode changes. Provides the character, previous mode, and previous custom mode to all bound listeners.

Caveats & Gotchas

  • Bindings receive the character, previous mode, and previous custom mode, but not the new mode. Bound handlers must query GetCharacterMovement()->MovementMode for the current state.
  • This delegate fires after OnMovementModeChanged() completes, so JumpCurrentCount has already been reset by the time listeners are invoked. Do not rely on JumpCurrentCount being non-zero inside a bound handler triggered by a landing.

Signature

FMovementModeChangedSignature MovementModeChangedDelegate;

Example

Bind an ability system component to movement mode changes C++
void AMyCharacter::BeginPlay()
{
    Super::BeginPlay();
    MovementModeChangedDelegate.AddDynamic(this, &AMyCharacter::OnMovementModeUpdated);
}

void AMyCharacter::OnMovementModeUpdated(ACharacter* Character, EMovementMode PrevMode, uint8 PrevCustomMode)
{
    // Re-evaluate gameplay tags based on new movement mode
    UpdateMovementTags(PrevMode);
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.