I'm having a hard time trying to find the function to get if a particular tile (exact position) is passable or not. I tried looking in the documentation but couldn't find it. I've looked in Game_Map, Game_Player, Scene_Map and Spriteset_Map but couldn't find it.
Also, the function "data" from the Game_Map object ( $gameMap.data() ) returns a huge array with numbers in thousands, like [1551, 1536, etc.]. Any idea what that is (maybe what I'm looking for???)???
Thanks for the help!
$gameMap.isPassable(x, y, dir)
A tile is not just "passable" - it's passable in a certain direction.
1) you need to clarify what you're looking for, because you're mixing a few things up.
A tile is passable or not based on the tileset, that has nothing to do with the map position.
A map position is passable dependent on the combination of tiles placed there, and therefore map passability has only indirectly to do with the tile passability.
asking for the passability of a map position is something completely different than asking for the passability of a tile as a result.
And the numbers you mention are the internal tile IDs that tell the engine which tiles from the active tileset are placed where on the map. Each of that number refers to the tile, whose complete data is in the tileset.
Thanks!
I was referring to a passage of a particular position on the map, after taking into account everything (tilseset, all the layers, events). I looked a bit more and found what I'm looking for (I think?). It's the function $gameMap.isPassable(x, y, d). Thought I'm not sure it takes events into account (just found it, still need to test it cause it's faster than trying to understand the code). And I'm not sure what the 'd' parameter is yet.
Never mind for the 'd' parameter, I didn't read all the comments before posting.
Thanks everyone!
No. Look at the number pad on your keyboard. It's 8 for up, 4 for left, 6 for right, and 2 for down.
The isPassable function changes that to whatever bit it needs to look at. You don't have to worry about that.