Hello,
I've asked this question elsewhere to no avail, so here's hoping for a reply!
I'm not sure how to check whether an object is blocking the player's movement route (via an autostart movement call). The code I've been using only checks for map passability, not event passability:
$gameMap.isPassable($gamePlayer.x+1, $gamePlayer.y, $gamePlayer.directionRight)
Any help is appreciated!
Hello Monsieur86,
Thanks for your reply. I hadn't thought of issuing a movement command and then checking whether the event's x/y coordinates == the expected x/y. :)
if $game_player.passable?(x, y, d)
# Do stuff here
end
As you can see, its part of the Player, not the Map. The Map part of passable is also checked by the Player for both Tiles and Events.
How would you set up this example using the Map instead of the Player? Would this be right?:
if $game_map.event().passable?(x,y,d)
Hello Monsieur86,
Thanks for your reply. I hadn't thought of issuing a movement command and then checking whether the event's x/y coordinates == the expected x/y. :)
if $game_player.passable?(x, y, d)
# Do stuff here
end
As you can see, its part of the Player, not the Map. The Map part of passable is also checked by the Player for both Tiles and Events.
How would you set up this example using the Map instead of the Player? Would this be right?:
if $game_map.event().passable?(x,y,d)
That looks correct. Sorry, been busy for a few days so late reply. Did the code above work for you? I think it may need an Event ID in the $game_map.event(ID GOES HERE) part...