NPC approach player when looked at

Hello everybody, I am trying to develop a hitman-like game in RPG Maker. I've figured out most of the mechanics for the game, but I have no idea how to do this. Basically, I want to make it so if the NPC turns in the general direction of the player, and they are not behind an object, the NPC should begin approaching towards them. I can figure out the death system later, but I just need help with this mechanic before I work on anything else. Thanks guys! Tell me if I need to provide more information!
Yanfly has a series of Plugins which help with this. Check it out:

http://yanfly.moe/2016/06/03/yep-105-event-encounter-aid-rpg-maker-mv/

http://yanfly.moe/2015/10/21/yep-20-event-chase-player/

http://yanfly.moe/2016/03/05/yep-79-event-chase-stealth/

Thanks! I'll check it out and report back here later.

Original thread: https://forums.rpgmakerweb.com/threads/npc-approach-player-when-looked-at.98025/