change region id?

so for my game an event happens where the player hits a mountain and the mountain and the airhip he was traveling in are destroyed but he needs a ship ram to do so.

im using this script to prevent airships from traveling over mountains.

http://yanflychannel.wordpress.com/rmvxa/field-scripts/move-restrict-region/

im using "63" as my region.

i dont want the player able to destroy the mountain until he has the ram.

however once he does destroy the mountain. the region ID wont let him through 

any ideas? 

thanks,

noahjmina
so for my game an event happens where the player hits a mountain and the mountain and the airhip he was traveling in are destroyed but he needs a ship ram to do so.

im using this script to prevent airships from traveling over mountains.

http://yanflychannel.wordpress.com/rmvxa/field-scripts/move-restrict-region/

im using "63" as my region.

i dont want the player able to destroy the mountain until he has the ram.

however once he does destroy the mountain. the region ID wont let him through 

any ideas? 

thanks,

noahjmina
Should be able to do this with a script. $game_map.map.data has all the map data, including the regions, though I'm not sure if all of that is public by default.

You could also just use events so that when you move onto the tile next to the rammed mountain, it does a transfer to the tile on the otherside of the rammed mountain. Just set a switch when the mountain is rammed (This won't require scripting, but it'll look a bit awkward).
Changing the region ID needs a script at best, because the map-data can't be changed without scripting.

Using such a script when another script already manipulated region map data is a bit complex...

Have you tried other solutions like putting an event to block the path or checking player coordinates in a parallel process?

Edit:

@Zechnophobe: That works only if the map is never visited again, because $game_map is reloaded upon entering the map again. You'll need a way to change that data every time the map is revisited.
@Andar

Well, I'd assume you'd have a script call whenever the map loads that does it, with a single manual call to that script when the mountain gets rammed. But you are correct, it's always extra work to 'modify' the main data structures of the game.
how abut an easier way to stop the airship from traveling over mountains. keep in mind im using yanflys basic module. and wont be able to use victors new vehicle thingy without his module. and they do not work together
Well, can't a conditional branch be used on parallel to check to see if the switch is active?  Such as:

: Script: if $game_switches[n] == true

  #code

 else

 end

: Erase Event

I would think that would make it a bit easier and every time the map is visited it checks if the switch is on and does what is needed or not needed, then erases to prevent it from continuously running.

Original thread: https://forums.rpgmakerweb.com/threads/change-region-id.17130/