How do you find the coordinates of your actors?

I think I should clarify...


I know that in order to find the Map X and Map Y of your Player, you can grab that data in the Game Data when you create a new Control Variable. My question is how do you find the Map X and Map Y data for the actors that are following you? When you create a puzzle that requires an actor to stand on a spot, it deactivates as soon as the player steps off, however if you have actors behind the player the trigger no longer activates as it does not consider the actors following you as separate events. Is the location of actors that are in your party something that must be scripted? 
So you want this to activate when the player OR any of the followers are standing on the spot?


You couldn't use an event with a Player Touch trigger, as that only works for the player and not followers.  So you would need a parallel process event that continually checks, and does something if the player or followers are on the spot.


You could check the X and Y value, but if it's a set location, it's easier to place a region tile on the spot, and check the characters' regions (only one value being tested, not two, so your script call will be shorter).


Something like this would work in a conditional branch - assume you're using region 15, so change it to whatever region you're using:

Code:
Conditional Branch: Script: $gamePlayer.regionId() === 15  || $gamePlayer.followers().some(function(follower){ return follower.isVisible() && follower.regionId() === 15 });

Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-find-the-coordinates-of-your-actors.72467/