Fetch and check map distances between events/player/followers

Kronicide

Veteran
Veteran
Joined
Jul 7, 2020
Messages
39
Reaction score
22
First Language
Swedish
Primarily Uses
RMMV
A small plugin that lets you retrieve the map distance between events/player/followers, or check whether they are within a given range of each other. (This functionality may already be provided by some other plugin, I'm not sure.)


DESCRIPTION

Provides two JavaScript functions:

JavaScript:
this.eventDistance(EVENT1, EVENT2)

Returns the distance in map squares between EVENT1 and EVENT2.
Use in the script box to set a variable, for example.

JavaScript:
this.eventInRange(EVENT1, EVENT2, RANGE)

Returns true if EVENT1 is within RANGE of EVENT2.
Use as a test in the script box of an event's conditional branch
condition.

Example:
Skärmklipp 2020-07-09 18.33.58.png

Event IDs can be -1 for player, -2, -3, ... for followers,
or regular event IDs.

TERMS OF USE
Do whatever you like with it.

COMPATIBILITY
Doesn't override anything so should be compatible with everything.
No dependencies.
 

Attachments

  • Krons_EventDistance.js
    2.5 KB · Views: 13
Last edited:

RyanYe

RPG Game Lover
Veteran
Joined
Dec 31, 2020
Messages
94
Reaction score
15
First Language
English
Primarily Uses
RMMV
wow this is so sweet! I am looking for this plugin for DECADES!!
thank you ! thank you !!
 

Latest Threads

Latest Posts

Latest Profile Posts

A side story is almost getting into the next stage. Almost everything in this game has real-life references.
unfinishedbuildingwip1.jpg
Everyday life is full of absurdity. This is just a reflection.
TFW you discover how the script batching works in VNMaker... after you've had the program for almost 3 years.
hAx6iQ3.gif

Writes that the characters have to climb a mountain.

Realized that I have to draw six sets of models where characters are climbing.

At least I know how to draw something. :)
I'm currently scratching my head on how to design plains. What do I even put in plains? Some trees (but not too many or it turns into a forest)? Grass? A few bushes? That's a bit dull.
I'm looking for tutorials but Google didn't seem to find much (or maybe I have the wrong keywords). I don't know how to map plains and I don't know how to learn.

Forum statistics

Threads
111,403
Messages
1,060,868
Members
144,751
Latest member
Louarn
Top