Make Noice onhit

Hello. Im trying to create a system in which i want an actor to make a noice when it hits something so that the AI gets distracted. But i dont know how to do it in c++. Im also confused about where should i code, on player pawn/character or projectile. Please Help. Its so hard to find c++ guide.

Should i expect an answer???