AActor::MakeNoise

Syntax

void MakeNoise
(
    float Loudness,
    APawn * NoiseInstigator,
    FVector NoiseLocation,
    float MaxRange,
    FName Tag
)

Remarks

Trigger a noise caused by a given Pawn, at a given location. Note that the NoiseInstigator Pawn MUST have a PawnNoiseEmitterComponent for the noise to be detected by a PawnSensingComponent. Senders of MakeNoise should have an Instigator if they are not pawns, or pass a NoiseInstigator.

Parameters

Parameter

Description

Loudness

The relative loudness of this noise. Usual range is 0 (no noise) to 1 (full volume). If MaxRange is used, this scales the max range, otherwise it affects the hearing range specified by the sensor.

NoiseInstigator

Pawn responsible for this noise. Uses the actor's Instigator if NoiseInstigator is null

NoiseLocation

Position of noise source. If zero vector, use the actor's location.

MaxRange

Max range at which the sound may be heard. A value of 0 indicates no max range (though perception may have its own range). Loudness scales the range. (Note: not supported for legacy PawnSensingComponent, only for AIPerception)

Tag

Identifier for the noise.

References

Module

Engine

Header

Runtime/Engine/Classes/GameFramework/Actor.h

Source

Runtime/Engine/Private/Actor.cpp