- Joined
- Jan 8, 2014
- Messages
- 1,055
- Reaction score
- 785
- First Language
- English
- Primarily Uses
- RMMV
@Tsukihime You can use the "$gameMap.getCharactersAt(collider, ignore)" function, ignore parameter is optional and you can manually filter.
Every character has a collider that can be accessed with the .collider() function for example:
var collider = $gamePlayer.collider();
var characters = $gameMap.getCharactersAt(collider);
characters will returns an array filled with events, players, followers that overlap with the players collider which you can manually filter. Or you can use the ignore parameter like:
var collider = $gamePlayer.collider();
var characters = $gameMap.getCharactersAt(collider, function(chara) {
if (chara === $gamePlayer) {
return true; // ignore if character is $gamePlayer
}
if (chara.constructor === Game_Follower) {
return true; // ignore if character is a game follower class
}
return false;
});
The ignore function is a bit confusing, Not sure why I wrote it that way lol.
Every character has a collider that can be accessed with the .collider() function for example:
var collider = $gamePlayer.collider();
var characters = $gameMap.getCharactersAt(collider);
characters will returns an array filled with events, players, followers that overlap with the players collider which you can manually filter. Or you can use the ignore parameter like:
var collider = $gamePlayer.collider();
var characters = $gameMap.getCharactersAt(collider, function(chara) {
if (chara === $gamePlayer) {
return true; // ignore if character is $gamePlayer
}
if (chara.constructor === Game_Follower) {
return true; // ignore if character is a game follower class
}
return false;
});
The ignore function is a bit confusing, Not sure why I wrote it that way lol.

