Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

[Solved]Check passibility

I am looking for a script call that checks the passibility of the tile I am facing, now I have already found the script call but I cannot figure out the proper way to use it.

JavaScript:
$game_player.passable?(x, y, direction)
I know back in VX Ace I could use this:

Code:
$game_player.passable?($game_player.x, $game_player.y, $game_variables[4])
So I tried to use the same exact same variables in MV but it doesn't seem to work and yes, I did make the 4th variable equal to the player's direction.

Thanks in advance for your help!
 
Try this:
JavaScript:
$gamePlayer.canPass($gameVariables.value(1), $gameVariables.value(2), 6)
This used in a condtionnal branch will return true if the palyer can leave the tile at the left (6 means going right ) to the tile specified by the variables 1 & 2.
 

Dad3353

Praised Adventurer
For neophytes such as myself, these tips are golden. Thank you.

I did find that, when using this text in an event, I needed to finish it off with a semi-colon (';'...) to get it accepted. Probably an 'open secret' that everyone knows, but I just thought I'd mention it; it may save someone a bit of anguish.
 
Top