change region id?

NoahJMina

RPG survivalist
Veteran
Joined
Aug 2, 2013
Messages
151
Reaction score
14
First Language
English
Primarily Uses
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
 

Zechnophobe

Veteran
Veteran
Joined
Jul 17, 2013
Messages
93
Reaction score
2
First Language
English
Primarily Uses
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).
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
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.
 

Zechnophobe

Veteran
Veteran
Joined
Jul 17, 2013
Messages
93
Reaction score
2
First Language
English
Primarily Uses
@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.
 

NoahJMina

RPG survivalist
Veteran
Joined
Aug 2, 2013
Messages
151
Reaction score
14
First Language
English
Primarily Uses
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
 

djDarkX

Retro & Remastered Music Guru
Veteran
Joined
Jan 17, 2013
Messages
2,700
Reaction score
1,901
First Language
Music
Primarily Uses
RMMV
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,868
Messages
1,017,066
Members
137,576
Latest member
SadaSoda
Top