How to make town reject vehicle?

Okay, So I was wondering if it is at all possible to make a transfer event reject the player


if they are in a vehicle. I need this because I have had my car enter some towns


with some strange consequences. Is there a way to force the player to exit the vehicle


before they can enter a town?
Can you just add a Get On/Off Vehicle command prior to the transfer?  I think there's a conditional branch for 'vehicle X being driven' if you want to go to that effort, but I don't think it would be necessary (if you're not in a vehicle, then you're not going to get out of the vehicle).  The only issue might be that it could leave the vehicle on the same tile as the transfer event, which could be problematic.  In that case, using the conditional branch, followed by a Get On/Off Vehicle, followed by a Set Vehicle Location to just move the car a few tiles away (so it's not obstructing the transfer event, but the player won't land right on it once they leave the town) might be a better solution.
use a conditional branch with a script code on the transfer event to check if the player is on a vehicle


the code is: $game_player.normal_walk?


This way the event will not process the events inside of the conditional branch while the player is on a vehicle.
In that case, using the conditional branch, followed by a Get On/Off Vehicle, followed by a Set Vehicle Location to just move the car a few tiles away (so it's not obstructing the transfer event, but the player won't land right on it once they leave the town) might be a better solution.


use a conditional branch with a script code on the transfer event to check if the player is on a vehicle


the code is: $game_player.normal_walk?


This way the event will not process the events inside of the conditional branch while the player is on a vehicle.

This works!


Sorry about that, I didn't notice the vehicle section of continental branch. Sort of embarrassing, I've been using RPGM for years.


Thanks a lot! This fixed a huge problem I've been dealing with for a while. 

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-town-reject-vehicle.60886/