Difference between revisions of "Event Chase Player (YEP)"

From Yanfly.moe Wiki
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{MvPlugin
 
{{MvPlugin
 
|preview  =  <youtube>https://www.youtube.com/watch?v=oIQxbBS4tpo</youtube>
 
|preview  =  <youtube>https://www.youtube.com/watch?v=oIQxbBS4tpo</youtube>
|link1  = <html><iframe src="https://itch.io/embed/399567" height="167" width="552" frameborder="0"></iframe></html>
+
|link2 = <html><iframe src="https://itch.io/embed/507967" height="167" width="552" frameborder="0"></iframe></html>
|link2  = [http://yanfly.moe/plugins/en/YEP_EventChasePlayer.js Mirror]
+
|link3 = <html><iframe src="https://itch.io/embed/398158" height="167" width="552" frameborder="0"></iframe></html>
  
 
}}
 
}}
Line 20: Line 20:
 
</nowiki>
 
</nowiki>
  
== How to Use ==
+
{{Script Calls MV}}
  
 
  <nowiki>
 
  <nowiki>
Line 52: Line 52:
 
the event will not chase the player just yet.
 
the event will not chase the player just yet.
 
</nowiki>
 
</nowiki>
 +
 +
{{Tips & Tricks MV}}
 +
 +
* [[On Map Encounters (MV Plugin Tips & Tricks)|On Map Encounters]]
  
 
== Changelog ==
 
== Changelog ==
Line 92: Line 96:
 
- Finished Plugin!
 
- Finished Plugin!
 
</nowiki>
 
</nowiki>
 +
 +
<!-- This is a comment, remove the arrows surrounding this for the categories you want to show -->
 +
<!-- [[Category: RPG Maker MV Core Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Battle Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Item Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Skill Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Equip Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Status Menu Plugins]] -->
 +
[[Category: RPG Maker MV Gameplay Plugins]]
 +
[[Category: RPG Maker MV Movement Plugins]]
 +
<!-- [[Category: RPG Maker MV Quest Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Options Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Eventing Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Utility Plugins]] -->
 +
[[Category: RPG Maker MV Mechanical Plugins]]
 +
<!-- [[Category: RPG Maker MV Visual Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Menu Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Message Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Quality of Life Plugins]] -->
 +
<!-- [[Category: RPG Maker MV Plugin Tips & Tricks]] -->
 +
<!-- [[Category: Action Sequences (MV)]] -->
 +
<!-- [[Category: Comment Tags (MV)]] -->
 +
<!-- [[Category: Main Menu Manager Integration (MV)]] -->
 +
<!-- [[Category: Notetags (MV)]] -->
 +
<!-- [[Category: Options Core Integration (MV)]] -->
 +
<!-- [[Category: Plugin Commands (MV)]] -->
 +
<!-- [[Category: Script Calls (MV)]] -->
 +
<!-- [[Category: Text Codes (MV)]] -->

Latest revision as of 11:02, 13 June 2020

Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.



Download

System

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.


Masterarbeit Writer

Extension Plugins

The following plugins are Extension Plugins that require this plugin as its Parent Plugin.

Place the following plugins below this plugin located in the Plugin Manager if you plan on using them.

Yanfly Engine Plugins

This plugin is a part of the Yanfly Engine Plugins library.


Introduction

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.

Script Calls

ScriptCallsMV.png

Script Calls are event commands that are used to run JavaScript code during an event to call upon unique functions, usually added by the related plugin.

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.

Tips & Tricks

The following Tips & Tricks effects use this plugin:

Changelog

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!