RealDocs

AActor::SetMakeNoiseDelegate

function Engine Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: static

Description

Replaces the global delegate that handles `MakeNoise` calls, allowing custom AI hearing logic to intercept or replace the default noise propagation.

Caveats & Gotchas

  • This is a static, engine-wide replacement — setting it affects every actor that calls `MakeNoise` in the entire game. Calling it more than once will silently overwrite the previous handler.
  • The default implementation is `AActor::MakeNoiseImpl`. If you replace it without calling the original, built-in AI perception noise events will stop working. Typically only overridden in the game's `GameMode` or a custom audio manager.

Signature

static ENGINE_API void SetMakeNoiseDelegate(const FMakeNoiseDelegate& NewDelegate)

Parameters

Name Type Description Default
NewDelegate const FMakeNoiseDelegate& The new delegate to use as the global MakeNoise implementation.

Return Type

void

Example

Install a custom noise handler at game start C++
void AMyGameMode::BeginPlay()
{
    Super::BeginPlay();
    AActor::SetMakeNoiseDelegate(
        FMakeNoiseDelegate::CreateStatic(&AMyGameMode::CustomMakeNoise)
    );
}

void AMyGameMode::CustomMakeNoise(AActor* NoiseMaker, float Loudness,
    APawn* NoiseInstigator, const FVector& NoiseLocation, float MaxRange, FName Tag)
{
    // Custom noise logic, then optionally call default:
    AActor::MakeNoiseImpl(NoiseMaker, Loudness, NoiseInstigator, NoiseLocation, MaxRange, Tag);
}

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.