Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Check Passability of Tile of x and y?

I want to assign two variables, one to an x coordinate and one to a y coordinate, and then determine if that tile is passable. How would I do this?

Thanks in advance!
:3

EDIT: I guess it's necessary that I specify that I need to check if the tile specified is NOT passable.
 

Zeriab

Sponsor

Assuming you are using RMXP:
[rgss]#--------------------------------------------------------------------------
# * Determine if Passable
#     x          : x-coordinate
#     y          : y-coordinate
#     d          : direction (0,2,4,6,8,10)
#                  *  0,10 = determine if all directions are impassable
#     self_event : Self (If event is determined passable)
#--------------------------------------------------------------------------
$game_map.passable?(x, y, d, self_event = nil)
[/rgss]

I hope this is enough information.

*hugs*
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top