Enemy Agression plugin/method?

MegaGothmog

Villager
Member
Joined
Mar 29, 2022
Messages
28
Reaction score
4
First Language
Dutch
Primarily Uses
RMMZ
Hey there.
I'm relatively new to PRGMaker MZ and I'm trying to get enemies to turn agressive and home-in on the player when you get closer to them.. or when they see you.
I do not mean an 'aggro in-battle' and having the enemy target the one character rather than the other.. I mean having NPCs on the map approach you when you get close to them.

I have tried to set the Autonomous movement of a character to Approach, but this makes them move towards me, no matter where I am on the map.
Is there a way to limit this to either their view, or a specific area around the NPC ?
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,788
Reaction score
2,232
First Language
English
Primarily Uses
RMMV
I use GALV_EventDetectors.js for what you described, but ofc, I use MV. I'm sure there is an MZ equivalent to that plugin though.
 

woootbm

Super Sand Legend
Veteran
Joined
Apr 26, 2014
Messages
398
Reaction score
384
First Language
English
Primarily Uses
RMMV
Something I did in MV (and I expect these features should still exist in MZ) is place events with switches around an enemy that patrols around. The switch changes their event page to one that has a chase movement route:
1656446911562.png
Those script events will play an animation and then move the event back to its original location (these commands might be different in MZ). Then the switches turn off the aggro switch I made. I have an additional switch because my first event page has an aggro animation that plays so that the enemy alerts the player that they've started to chase (like Metal Gear or something).

Just add or remove more "move toward player" commands to influence how long they will chase the player.

Of course, you don't have to do the ending bit if you just want the enemy to endlessly chase the player. You'll also want to turn these switches off when you transfer zones otherwise the enemies will immediately chase the player when you re-enter the zone.
 

Frostorm

[]D[][]V[][]D
Veteran
Joined
Feb 22, 2016
Messages
2,788
Reaction score
2,232
First Language
English
Primarily Uses
RMMV
This addon is exactly what you want: http://www.yanfly.moe/wiki/Event_Chase_Player_(YEP)
Not sure if it works with fossil for MZ though.
Ah, I've tried that one before as well. I don't quite remember why I switched from YEP_Even_Chase_Player to GALV_EventDetectors, but it had to do with being able to set multiple behaviors or conditional behaviors or something along those lines.

But in any case, this might be the MZ version of those plugins:
 

MegaGothmog

Villager
Member
Joined
Mar 29, 2022
Messages
28
Reaction score
4
First Language
Dutch
Primarily Uses
RMMZ
Ah, I've tried that one before as well. I don't quite remember why I switched from YEP_Even_Chase_Player to GALV_EventDetectors, but it had to do with being able to set multiple behaviors or conditional behaviors or something along those lines.

But in any case, this might be the MZ version of those plugins:
I was going throught he VisuStella library trying to find a plugin that was like this... but i must've missed it. Thanks for the suggestion.. this one seems to fit my needs quite well.
 

Latest Threads

Latest Posts

Latest Profile Posts

I'm really sorry I haven't done any streams. I actually just got home from the hospital after a week and a half.
I'm not dead - I promise :stickytongue:

Anyway, some pokemon inspired art (dont ask me which one tho xD)
reali.png
Writing boss music for Pale Coins. This is the Goblin Mage's theme!

Caz
I've been trying to upload more video tutorials for RMMZ lately! Does anyone have a topic they'd like to see covered? :ehappy:

Forum statistics

Threads
129,716
Messages
1,204,589
Members
170,790
Latest member
ess_
Top