Presetting certain tile to become obstacles/pass-able is do-able in the script.
Similar to what Shaz said, it's in the passage check setting in game_map.
The way how the passage check works, it's impossible to pair switches with the 3 ready made checks. we will need to add "extra" checks to that method to make things work. (not only that, there will be boat/ship passage too).
The problem with that is, it's based on the tile id. and
each autotile can end up with 9 ids. so depending on the blocks you need, it can be a big list to make. PLUS, when you change to a map with a different tileset, the tile ids are
STILL the
SAME. eg, world map & dungeon map actually shares the same tile ids. This will lead to lots of problems like when you block a tile in the world map, you might block a tile in dungeon map too. Though it can be overcome with switches(eg, switch 1 on = world map), it will still require the script user to at least understand a bit of coding to be able to add more than one set of blocks.
So instead of working the solution on tiles, why not try something like
terrain tags or
region ids?
Terrain Tag type check:
#==============================================================================# Meow Face's Passage Block with Switch (Terrain Version)#==============================================================================module MEOWCHECK#==============================================================================# Settings Area#============================================================================== TERRAIN = [1,2,3] #Change this to terrain tag numbers you want to block TSWITCH = 1 #Switch number to turn the block on/off#==============================================================================# End of Setting Area#==============================================================================endclass Game_CharacterBase alias meowtpass? passable? def passable?(x, y, d) meow = MEOWCHECK::TERRAIN x2 = $game_map.round_x_with_direction(x, d) y2 = $game_map.round_y_with_direction(y, d) if $game_switches[MEOWCHECK::TSWITCH] meow.each do |m| return false if $game_map.terrain_tag(x2, y2) == m end end meowtpass?(x, y, d) endend
Region type check:
#==============================================================================# Meow Face's Passage Block with Switch (Region Version)#==============================================================================module MEOWCHECK#==============================================================================# Settings Area#============================================================================== REGION = [1,2,3] #Change this to region id numbers you want to block RSWITCH = 1 #Switch number to turn the block on/off#==============================================================================# End of Setting Area#==============================================================================endclass Game_CharacterBase alias meowrpass? passable? def passable?(x, y, d) meow = MEOWCHECK::REGION x2 = $game_map.round_x_with_direction(x, d) y2 = $game_map.round_y_with_direction(y, d) if $game_switches[MEOWCHECK::RSWITCH] meow.each do |m| return false if $game_map.region_id(x2, y2) == m end end meowrpass?(x, y, d) endend
edit:
both snippets are free for commercial/non-commercial games.