Heya.
I'm trying to use this plugin (https://atelierrgss.wordpress.com/rmv-pick-up-and-throw/) and stumbled upon an issue with autotiles and the way MV handles their passability.
Long story short, I would like to have a Region in which the player cannot throw events.
I'd like some help to add another check that checks whether the tile's Region is X, and if so, return false.
Any help? Thanks in advance!
I'm trying to use this plugin (https://atelierrgss.wordpress.com/rmv-pick-up-and-throw/) and stumbled upon an issue with autotiles and the way MV handles their passability.
Long story short, I would like to have a Region in which the player cannot throw events.
I'd like some help to add another check that checks whether the tile's Region is X, and if so, return false.
Any help? Thanks in advance!
Code:
//==============================
// * can Pass Throw
//==============================
Game_CharacterBase.prototype.canPassThrow = function(x, y, d) {
var x2 = $gameMap.roundXWithDirection(x, d);
var y2 = $gameMap.roundYWithDirection(y, d);
if (d === 2) {x3 = x; y3 = y + 1;
} else if (d === 4) {x3 = x - 1;y3 = y;
} else if (d === 6) {x3 = x + 1;y3 = y;
} else {x3 = x;y3 = y - 1;
};
if (!$gameMap.isValid(x2, y2)) {
return false;
};
if (this.isThrough() || this.isDebugThrough()) {
return true;
};
if (!$gameMap.isPassable(x3, y3)) {
return false;
};
if (this.isCollidedWithCharacters(x2, y2)) {
return false;
};
return true;
};