How to enable collision with terrain tags based on switches?

Hello, I am trying to enable movement along certain tiles (which are normally water tiles that cannot be passed through) when one switch is active, and when that same switch is active I want certain tiles which are normally passable to become collisions. I was thinking this is something I could accomplish with terrain tags but I cannot figure out how to actually control the collisions with a switch. Does this seem possible without plugins, and if not, what plugins could I possibly use?
You're in luck, this just released a week ago. Edit: It's for MV, but might work for MZ.

If that doesn't work, you can get a region passability plugin and edit every instance of
$gameMap.regionId
to
$gameMap.terrainTag
You're in luck, this just released a week ago. Edit: It's for MV, but might work for MZ.

If that doesn't work, you can get a region passability plugin and edit every instance of
$gameMap.regionId
to
$gameMap.terrainTag
That actually seems perfect, I'll test it out now. Thank you!
You're in luck, this just released a week ago. Edit: It's for MV, but might work for MZ.

If that doesn't work, you can get a region passability plugin and edit every instance of
$gameMap.regionId
to
$gameMap.terrainTag
It didn't end up working since it's for MV, but I'll see if I can find something similar.
There are a number of plugins that will do passability by region but generally aren't toggleable. You would have to either edit one of those plugins to add a switch condition and map refresh, and also change the region references to terrain ones, or do a tileset change to an identical map but with different passabilities on the affected tiles.
Does it not work for MZ as well? I'm not aware of any major changes to the passability function.
Does it not work for MZ as well? I'm not aware of any major changes to the passability function.
Nevermind, I was using it wrong. It works perfectly fine now. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-enable-collision-with-terrain-tags-based-on-switches.165211/