Download

Why is MakeNoise not working?

Hey Guys.
Well im doin the Course from Tom Looman and trying to get the Goals in a RPG like Game.
In my Case i have a simple Actor that should make some Sound (for testing purposes every Tick)
so the AI will look at the Actor if it heares it.

Well for the Character a simple NoiseEmitter->MakeNoise(this, 1.0f, GetActorLocation)) was everything i needed to get it done. The Character is working properly but it seems not to working on an simple Actor this Way and i dont know whats the Reason behind this …
The Actor is not spawning like a Projectile its already in the Scene placed on an Platform. I wanna drop it just behind the AI and it should realize the Sound but it doesnt.

I cant believe such a simple thing like MakeNoise is able to gimme 1 full day of trying pretty much everything …

Setup:

Char works:

Actor not:

// Called every frame
void ANoiseMaker_Pawn::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

	NoiseEmitterComp->MakeNoise(this, 1.0f, GetActorLocation());
}

I have tried MakeNoise(1.0f, GetInstigator()) too and did SetInstigator() with the same Result, nothing happens…

Im pretty lost now cause it seems i dont understand something important here.

Rly noone have an Idea ?

Step through the Make Noise function. The only way it won’t register the Noise is if the Actor is not a Pawn and does not have a Controller (AI or otherwise). If your AI is both of those - then it should be working and it may be your Behavior Tree logic or something else. Again, definitely want to walk through these simple components to get a feel for debugging in the future.

Oh wait it needs a Controller to get realized by the PawnSensingComponent ?
Well in this case i think i have to Cast. I thought i can just give an Actor a MakeNoise Function in the Tick Function and thats it …

Well this will help thx alot !