A way for events to recognize they are close to each other?

Kelphy

The Kelphy Corp
Veteran
Joined
Oct 19, 2015
Messages
87
Reaction score
6
First Language
English
Primarily Uses
RMMZ
I want a monster system where you can see them walking around as events. However if two monsters are pretty close to each other, when one initiates the battle(in-built battle system), the other one will be in the battle at the same time.

I can't think of any easy way to do this besides the whole finding coordinates for each event and doing a ridiculous amount of work for every single event.

If anyone can think of an easy way to do this, this would help my game so much!
Thank you!
 
Joined
Dec 7, 2016
Messages
11
Reaction score
0
First Language
English
Primarily Uses
All I can suggest is a mixture of a plugin and a variable checking common event set to parralel.
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
542
Reaction score
255
First Language
German
Primarily Uses
RMMV
This can calculate the distance betwen map events:
JavaScript:
$gameMap.distance($gamePlayer.x, $gamePlayer.y, $gameMap.event(1).x, $gameMap.event(1).y)
// calculates the distance betwen "Events" , or Event/Gampeplayer
// this example shows both Event(1) & Gampeplayer
// "$gamePlayer" can be replaced by "$gameMap.event(x)"
And you could use another Code to check/include all events on map:
JavaScript:
// this checks all GameMap Events
for (var i = 1; i <= $gameMap.events().length; i++) {
     var eventunit = $gameMap.event([i]);
     // add code here
};
 

Users Who Are Viewing This Thread (Users: 2, Guests: 3)

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,357
Members
137,803
Latest member
andrewcole
Top