ACharacter::StopAnimMontage
#include "GameFramework/Character.h"
Access: public
Specifiers: virtualUFUNCTIONBlueprintCallable
Description
Stops a playing animation montage on the character's mesh. If no montage is specified, stops whatever is currently active. Blend-out time is taken from the montage asset itself.
Caveats & Gotchas
- • Passing nullptr stops the active montage only if one is currently playing — calling it when nothing is playing is a no-op, not an error.
- • The blend-out duration is controlled by the montage asset's BlendOut setting, not by this call. To stop with a custom blend time use UAnimInstance::Montage_Stop directly.
- • On a network authority the stop is local only; clients playing the same montage via replication will not automatically stop unless you replicate the stop through a separate mechanism.
Signature
ENGINE_API virtual void StopAnimMontage(class UAnimMontage* AnimMontage = nullptr) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| AnimMontage | class UAnimMontage* | The montage to stop. If nullptr, stops the currently active montage. | nullptr |
Return Type
void Examples
Stop a specific montage on a custom event via Stop Anim Montage
Blueprint
Stop the currently active montage C++
// Stop whatever montage is playing on this character
StopAnimMontage(); Stop a specific montage C++
// Stop only the reload montage if it happens to be playing
if (ReloadMontage)
{
StopAnimMontage(ReloadMontage);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?