Jump to content
Lnik3500

Check if targeted tile is passable

Recommended Posts

Hello! :)

 

I would like to know if someone can help me for an event here!

 

I'm doing a variable based (X, Y) event to transfer and I would not want my character to appear IN a tree or something... So is there a way to move the character 1 tile higher or 1 tile under if the targetted tile is not passable?

 

Thanks in advance and sorry for my english! ;)

Share this post


Link to post
Share on other sites

You can use $game_map.passable?(x,y,d) in a conditional branch to check if a specific tile is passable. d is the direction it checks in. So, for example, you could use

 

$game_map.passable?($game_player.x, $game_player.y, 2)

 

to check the tile below the player.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×