Ok I am trying to set up an event where you can only transfer to a city when you are in your airship. How do I do that?
Airship and sky town problem
RPG Maker VXAce SupportYou want the airship to go into the city?
Events don't correspond to Player Touch when you're in the airship. So you would need to modify the scripts to allow them to, or instead of using an event with Player Touch, have a Parallel Process event that checks the coordinates of the player (or the region, terrain or whatever you want to use to determine whether they're over the city) and then do the transfer. The parallel process event can also check that the player is in the airship.
Events don't correspond to Player Touch when you're in the airship. So you would need to modify the scripts to allow them to, or instead of using an event with Player Touch, have a Parallel Process event that checks the coordinates of the player (or the region, terrain or whatever you want to use to determine whether they're over the city) and then do the transfer. The parallel process event can also check that the player is in the airship.
Yes exactly so where in the conditions can you set coordinates? Also I want it to land at the edge of the city and stay there so the player can go shoping then board the vehicle and leave the city.
And how is this different to what happens by default?
ok so it will transfer the airship at that point. So how do I set the coordinates?
No, it will not transfer the airship. But you do not want the airship transferred. You said you want them to be able to set the airship down near the city and then walk into the city. This is exactly what happens by default.
But I want them to be transfer while only riding the airship and then after they are done in the city to transfer back to the field map in airship. The reason for this is the tow can only be accessed when you are in the air because it is a sky town.
So you want the airship to go into the city map and for them to automatically get off, and then when they get back on again, it will automatically take them to the world map?
In that case, you will need to do something like this:
On your world map, use region codes to paint the areas you want to trigger this action. If you have several locations and you want to transfer to a different map for each one, use a different region code.
Create a parallel process event with code like the following - use appropriate variable ids to replace mine:
Conditional Branch: Vehicle Airship is Driven Control Variables [001: Player X] = Game Data > Player's > Map X Control Variables [002: Player Y] = Game Data > Player's > Map Y Get Location Info [003: Player Region] = Region ID of [001: Player X], [002: Player Y] (under Designation with Variables) Conditional Branch: Variable [003: Player Region] = 1 (region you placed on the town) Transfer Player: Town Map, X, Y Get on/off Vehicle Control Switches [001: Airship in Town] = ON Set Vehicle Location: Airship, World Map, anywhere Branch EndBranch EndWait 4 FramesNow, in the town, create an event with an Action Button trigger. Set its condition to Switch 001: Airship in Town. And set its sprite to the Airship. This event will only be visible when you have gotten off the airship. It should be located on the coordinates you set for your transfer event (so the event above will put the airship right on top of this event).Give it this code:
Set Vehicle Location: Airship, this map, same location as eventControl Switches [001: Airship in Town] = OFFGet on/off vehicleTransfer Player: World Map, outside town (not on one of the region tiles)The reason you need the event pretending to be the vehicle is so that you can detect when the player gets on, and then transfer them immediately out to the world map.
Also, are you using VX or Ace? Your profile says VX Ace, but you posted in the VX forum. They are not the same, and this solution will only work for Ace, as VX does regions (areas) differently.
Let me know if you're actually using Ace and I'll transfer this thread to the correct forum.
In that case, you will need to do something like this:
On your world map, use region codes to paint the areas you want to trigger this action. If you have several locations and you want to transfer to a different map for each one, use a different region code.
Create a parallel process event with code like the following - use appropriate variable ids to replace mine:
Conditional Branch: Vehicle Airship is Driven Control Variables [001: Player X] = Game Data > Player's > Map X Control Variables [002: Player Y] = Game Data > Player's > Map Y Get Location Info [003: Player Region] = Region ID of [001: Player X], [002: Player Y] (under Designation with Variables) Conditional Branch: Variable [003: Player Region] = 1 (region you placed on the town) Transfer Player: Town Map, X, Y Get on/off Vehicle Control Switches [001: Airship in Town] = ON Set Vehicle Location: Airship, World Map, anywhere Branch EndBranch EndWait 4 FramesNow, in the town, create an event with an Action Button trigger. Set its condition to Switch 001: Airship in Town. And set its sprite to the Airship. This event will only be visible when you have gotten off the airship. It should be located on the coordinates you set for your transfer event (so the event above will put the airship right on top of this event).Give it this code:
Set Vehicle Location: Airship, this map, same location as eventControl Switches [001: Airship in Town] = OFFGet on/off vehicleTransfer Player: World Map, outside town (not on one of the region tiles)The reason you need the event pretending to be the vehicle is so that you can detect when the player gets on, and then transfer them immediately out to the world map.
Also, are you using VX or Ace? Your profile says VX Ace, but you posted in the VX forum. They are not the same, and this solution will only work for Ace, as VX does regions (areas) differently.
Let me know if you're actually using Ace and I'll transfer this thread to the correct forum.
Sorry it was ment for VX Ace I didn't pay attention to the forum title, sorry Thanks for the help though. I also found a script that works too for what I want as well.
Original thread: https://forums.rpgmakerweb.com/threads/airship-and-sky-town-problem.45947/