Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/AActor
Description
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.
| Name | MakeNoise |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Actor.h |
| Include Path | #include "GameFramework/Actor.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Actor.cpp |
UFUNCTION (BlueprintCallable, BlueprintAuthorityOnly, Category="AI",
Meta=(BlueprintProtected="true"))
void MakeNoise
(
float Loudness,
APawn * NoiseInstigator,
FVector NoiseLocation,
float MaxRange,
FName Tag
)
Parameters
| Name | Remarks |
|---|---|
| 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. |