Well i try making something like a Stealth mechanic using region id, but i don't know how to make the NPC start to chase the player when it facing to the player so for now ITS just gonna auto chase the player whatever player at the region. Do you guys know how to make the NPC start chasing when it facing at the player when it on region id ? Is there is a script for that ?
MV/MZ Making NPC chased player when NPC facing at player
RPG Maker MZ SupportSome event chase plugins have line of sight. For a script call you'd have to do something like
Code:
if((this.x>=$gamePlayer.x && this._direction == 4)||(this.x<=$gamePlayer.x && this._direction == 6)||(this.y>=$gamePlayer.y && this._direction == 8)||(this.y<=$gamePlayer.y && this._direction == 2))
This plugin offers exactly that feature.
Check out this guy in youtube, i follow his stealth and chase mechanic
Original thread: https://forums.rpgmakerweb.com/threads/making-npc-chased-player-when-npc-facing-at-player.177842/