Enemy Agression plugin/method?

MegaGothmog

Villager
Member
Joined
Mar 29, 2022
Messages
6
Reaction score
2
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,226
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
336
Reaction score
295
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,226
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
6
Reaction score
2
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 Profile Posts

DamageEvil_5.png added!
index.php

Rendering the intro for the 4 time today, everytime it finished I noticed something that I found off and had to fix it and render it all over again...
Would not be so bad if it was not for my PC having the speed of a slug.:kaoswt2:
Tried something. Little sneak peak of Unity AD.
M42S7Us.gif

It's the little things. Lengthened the time the bar fades in and out to be a bit more comfortable.

Forum statistics

Threads
125,739
Messages
1,173,123
Members
164,889
Latest member
zyron250
Top