Hi guys! How do you get the tag from the make noise event after it is perceived by an AI? I can get the instigator, location, etc., but not the Tag I set in the Make Noise Event node.
Anyone know how?
Hi guys! How do you get the tag from the make noise event after it is perceived by an AI? I can get the instigator, location, etc., but not the Tag I set in the Make Noise Event node.
Anyone know how?
If you have in mind OnHearNoise delegate of the PawnSensingComponent then its signature has not “tag” parameter. But AActor::MakeNoiseDelegate has parameter Tag. Its all about 4.11
DECLARE_DELEGATE_SixParams(FMakeNoiseDelegate, AActor*, float /*Loudness*/, class APawn*, const FVector&, float /*MaxRange*/, FName /*Tag*/);
And internal method MakeNoiseImpl rejects Tag parameter:
void AActor::MakeNoiseImpl(AActor* NoiseMaker, float Loudness, APawn* NoiseInstigator, const FVector& NoiseLocation, float MaxRange, FName Tag)
{
check(NoiseMaker);
UPawnNoiseEmitterComponent* NoiseEmitterComponent = NoiseInstigator->GetPawnNoiseEmitterComponent();
if (NoiseEmitterComponent)
{
// Note: MaxRange and Tag are not supported for this legacy component. Use AISense_Hearing instead.
NoiseEmitterComponent->MakeNoise( NoiseMaker, Loudness, NoiseLocation );
}
}
FMakeNoiseDelegate AActor::MakeNoiseDelegate = FMakeNoiseDelegate::CreateStatic(&AActor::MakeNoiseImpl);