I want to check if a certain point in a map (x,y) is passable. Here is my code:
The code works if I put an unpassable tile on the map points as well as if the player stand on it. However, putting an event(priority: same as characters) on the map points returns 'passable'.
How can I know if an event is standing on a map point?
JavaScript:
var playerX = $gamePlayer.x;
var playerY = $gamePlayer.y;
var x = 11; //map point x
var y = 10; //map point y
var t = $gameMap.isPassable(x, y, 8);
if(!t || (playerX == x && playerY == y))
{
console.log('not passable');
}
else
{
console.log('passable');
}
The code works if I put an unpassable tile on the map points as well as if the player stand on it. However, putting an event(priority: same as characters) on the map points returns 'passable'.
How can I know if an event is standing on a map point?