PluginName: SDJB_PlayerTooFar Author: ShadowDragon CTBolt made a plugin for MZ found [here] and you can play the demo. However, when it seems to work in MV as well, I found 3 bugs.
PluginName: SDJB_PlayerTooFar
Author: ShadowDragon
CTBolt made a plugin for MZ found [
here] and you can play the demo.
However, when it seems to work in MV as well, I found 3 bugs.
1) distance X was set twice and used to be distance Y, as it was never used.
2) overlapping events trigger, you get stuck in the center of it.
3) it also trigger when you start outside of it.
while it uses 3-4 comments, I completely rewrote that code from the ground up with
the same effect in mind for both MV and MZ, instead of X and Y, I combined it for a radius.
Code:
Introduction
Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž
This plugin prevents the player from leaving an area by triggering events
when they move too far away.
It is useful for situations where the player must interact with an NPC
before leaving (e.g., receiving an item or picking something up).
How to use
Íž Íž Íž Íž Íž Íž Íž Íž Íž Íž
Add the following comment tag to an event page:
<EvDist: radius priority>
→ radius
The maximum allowed distance from the event.
If the player moves beyond this distance, the event will trigger.
If omitted, the default radius is used.
→ priority
Determines which event triggers first when multiple events overlap.
Higher values take priority.
If omitted, the default priority is used.
Examples:
<EvDist:> => Uses default radius and priority.
<EvDist: 5> => Uses radius 5 with default priority.
<EvDist: 5 3> => Uses radius 5 with priority 3.
Behavior:
→ The event triggers when the player exits its defined radius.
→ If multiple events are triggered at the same time:
1. The highest priority event is selected.
2. If priorities are equal, the closest event is selected
Basic Setup (I use region 12 around the event).
If event is placed above/below, set it ON the event to trigger with Action Trigger.
Event/Player touch has no effect as it still require action button if it has this comment tag.
===
TERMS OF USE ===
Free for Non-Commercial and Commercial use when credit is given.
credit one of the following:
ShadowDragon
ShadowDragonJB
CT_Bolt
===
WARNING ===
YOU ARE NOT ALLOWED TO REDISTRIBUTE OR SELL IT OR TAKE CODE FOR YOUR OWN.
DO NOT REMOVE THE HEADER.
(require my base plugin (
SDJB_Base or SDJB_BaseMVZ (minified version))
leave Feedback and or suggestions.
Download from
itch.io
(screenshot tomorrow how to set the basic up), play demo how it should look like, plugin released tomorrow.
=== TERMS OF USE === Free for Non-Commercial and Commercial use when credit is given. credit one of the following: ShadowDragon