Well, in such case if You have troubles of controling what is passable and what is not, why not using a bit of JS and special approach?
😛
rpg_objects.js:
JavaScript:
Game_CharacterBase.prototype.isMapPassable = function(x, y, d) {
var x2 = $gameMap.roundXWithDirection(x, d);
var y2 = $gameMap.roundYWithDirection(y, d);
var d2 = this.reverseDir(d);
return $gameMap.isPassable(x, y, d) && $gameMap.isPassable(x2, y2, d2);
};
This above, is default function that cheks if tile is Passable or not, You could simply modify it as:
JavaScript:
Game_CharacterBase.prototype.isMapPassable = function(x, y, d) {
var x2 = $gameMap.roundXWithDirection(x, d);
var y2 = $gameMap.roundYWithDirection(y, d);
var d2 = this.reverseDir(d);
if( $gameMap.regionId(x2, y2) == 1 ){return false;}
if( $gameMap.regionId(x2, y2) == 2 ){return true;}
return $gameMap.isPassable(x, y, d) && $gameMap.isPassable(x2, y2, d2);
};
The flat if statements checking if the tile that You trying to enter with the character is either region 1 or 2, if tile have region 1, it will block You to go there regardless of what tiles were set to, if the region is having value 2, it will let You go thru no matter what tiles says
😛
ofc. You can replace Region IDs with anything, and control where You can go and where not with simple region coloring
🙂
Simply,
1) copy the code above ( with the extra if statements )
2) open rpg_objects.js in any text editor, I believe You already have one
😛
3) Find the "Game_CharacterBase.prototype.isMapPassable" function ( use CTRL + F )
4) Replace the function with the one given above
5) You can replace which regions do what by simply changing numbers, for example:
if( $gameMap.regionId(x2, y2) == 5 ){return true;}
Would make region 5 to work as force pass region ( it's having green color in the engine
😛 )
6) Done
You can now just paint specific tiles that You want to either be passable or not using regions
😀