How can I get AI follow ''sound''

Like When player throws a ‘‘rock’’ and the AI go there (like it would have heard it) and then return back to path. Cant find any tutorials about it and have no experience in C++.