Hi, do you know if there's a way, using only scripts and without the help of plugins, to make an enemy wander around the map, so that when spot the player or the player is close, the enemy runs toward it? Because if I just set it to follow the player, it will follow them all over the map no matter what, i need something like in Fear and hunger kinda, Thank you very much in advance!
Enemies Spot your position
RPG Maker MZ SupportThis distinction is mostly pointless. A plugin is just a compile-on-boot script packaged in a convenient unit. A script call (i.e. eval, compiles & runs on the spot) is less efficient. Chase logic can potentially get quite complicated, that's why people write plugins for it. 😅
That said:
I posted it for MV nearly 7 years ago, and haven't tested it in MZ, but I think it should work. It only does what it says, e.g. it doesn't make the character return to their original position post-chase. 👋
If you want something more complicated, like line-of-sight, then I recommend looking for a suitable plugin. In theory I think it should be possible to implement a line-raster algorithm without scripting, and use that to check region IDs on an arbitrary sight-line, but I would personally choose a plugin.
Thank you so much, I didn't want to use Plugins because it's a simple game and I really couldn't understand them since English isn't my native language and most tutorials are in English or other languages. your script works just fine ty!
Original thread: https://forums.rpgmakerweb.com/threads/enemies-spot-your-position.176188/