Event Chase Player (YEP)
This is a plugin created for RPG Maker MV.
For help on how to install plugins, click here.
For help on how to update plugins, click here.
Got errors with your RPG Maker MV plugin? Click here.
Place the following plugins below this plugin located in the Plugin Manager if you plan on using them.
This plugin is a part of the Yanfly Engine Plugins library.
This plugin allows you to make events that will chase the player or flee from the player when the player enters within range of the event or when the event sees the player.
Here is a list of Script Call(s) that you may use:
Insert these lines into the script call window within the Movement Route event to give an event the chase or flee flag. Note: This doesn’t work with players. Script Call lines this._chaseRange = x Event will chase player if reaching x range. this._fleeRange = x Event will flee from player if reaching x range. this._chaseSpeed = x Event's movement speed when chasing. this._fleeSpeed = x Event's movement speed when fleeing. this._sightLock = x Event will flee/chase player for x frames. this._seePlayer = true Requires the event to be able to see player. this._seePlayer = false Doesn't require event to be able to see player. this._alertBalloon = x This balloon will play when player is seen. this._alertSound = x This sound will play when player is seen. this._alertSoundVol = x The volume used by the alert sound. this._alertSoundPitch = x The pitch used by the alert sound. this._alertSoundPan = x The pan used by the alert sound. this._alertCommonEvent = x This event will play when player is seen. this._returnAfter = true Returns the event back to its original spot. this._returnAfter = false Event stays where it is when finished chasing. this._returnWait = x How long event waits after finishing chase/flee. It is best to play this inside of a custom move route for the event at a high frequency rate. Keep in mind these effects only occur after the setting is made and ran, which means upon loading a map, if the event with a low frequency hasn't loaded up 'this._chaseRange = x' in its movement queue yet, the event will not chase the player just yet.
The following Tips & Tricks effects use this plugin:
Version 1.07: - Added a background mechanic to stagger an event if they're chasing the player and get caught behind an object. This will prevent the event from continuously chasing the player and dropping the FPS rate. Version 1.06: - Updated for RPG Maker MV version 1.5.0. Version 1.05: - Optimization update. Version 1.04: - Fixed a bug with this._seePlayer causing them to see stealthed players. Version 1.03: - Improved pathfinding for chasing events. They will get stuck less by walls and/or events that may be blocking the event. - Added random factor for fleeing events. Fleeing events won't simply just run away 180 degrees away from the player. They will sometimes move in a random direction. Version 1.02: - Added 'Return After' parameter where events will return to their original spot after chasing/fleeing from a player. - Added 'Return Wait' parameter to determine how long an event will wait in place before returning after a finished chase/flee. - Added 'this._returnAfter' and 'this._returnWait' to the list of available movement route script calls. Version 1.01: - Added 'this._alertSoundPitch' 'this._alertSoundVol' 'this._alertSoundPan' to the settings you can alter to adjust the alert sound. Version 1.00: - Finished Plugin!