AI Scare when see

Ok, so i added a scare sound effect when the AI see’s the player, but the problem is that when the AI see’s the player, it chases after him, so the AI is always looking at the player in that point, i want it so the AI plays the sound when it see’s the player, but it won’t keep repeating because the AI always look’s at the player, Please Help!

Please share how your code for playing the audio looks like to give you more details, but in general, just add a “doOnce” node in front of the playAudio logic. You can also start a timerByEvent after the play audio which connects in the RESET Pin of the doOnce - so it will scare the player again after lets say 30 sec for example :wink: If you use the pawn sensing, there is also an event when the ai looses sight of the player, use that to reset the delay or start a timer