Vehicle Switch - Bridges

Hey all, Noob here, have looked around a bit.

I have bridges, and am trying to solve it so that if:Boat is driven [common event] changes a switch of PlayerIsInBoat to ON, and then when PlayerIsInBoat is ON, bridges become 'above' the player.

Images attached of my Player in Boat SWITCH, and then the Template events that should work as a bridge when not in a boat, then a passable bridge IN a boat.

2021-12-13_11h45_49.jpg
2021-12-13_11h46_08.jpg
2021-12-13_11h46_11.jpg
and where do you call the common event?
currently it does nothing if not called somewhere
and where do you call the common event?
currently it does nothing if not called somewhere
Hey Andar, thanks for the quick reply.

Yeah I didn't pull the common event yet as I only just added that. I was trying tos we it there was a way without it.

I couldn't get the debug to show me player is in boat / or the switch changing at ALL when the player was in a vehicle.

Would I just call the common event on the first page of the template / copied event?

Sorry I'm super stupid
Just call the common event on the boat boarding event, or ditch the common event and manually turn on the switch in the event that boards you in the boat, up to you, everything else looks good and should work.
OK, in that case you should probably start by learning a few things about eventing in general.
This can be done either by the build-in tutorials or by one of several eventing tutorial games.
Some of those games are linked in my starting point tutorial, eventing hasn't changed much since VX and VXAce.

That said, the most important point you're missing is that all checks are single-time only, which means that simply calling the common event will only answer the status in the frame you're calling the event, not at a later time.
to handle what you want you either have to constantly call the common event again and again (bad solution due to lag, but sometimes the only one available) or design your entire game structure in a way that you can specifically call the event only if something changed (much more difficult to do, but without lag)
Right so bear with me. I don't have a boat boarding event, just a bridge event (from a template world and yanflys copied event plugin)
I guess I don't know if I should make a boat boarding event separately.

Guess I'm just missing some learning on my end to figure it out, seems simple enough. I would like PlayerInBoat switch to be a common event tbf as I would like to use it gamewide for various reasons.

Yep all good, thanks for your help, I'll play around and watch some more tutorials. I'm sure I'll figure it out.

All I wanted was a simple PlayerInVehicle switch to work
@bobbobnik the problem with @BK-tdm 's idea of a boarding event is that the boat can function without any event to board. That is why I made my post longer about the different options you have.

Basically you have several different ways to handle vehicles, with or without events and with or withoutplugins - the default method works completely without events or plugins but requires careful structuring of a map to give points where the player can get to the boat.

and without knowing how you want to use the boat we can't even point you to one solution, because using a boat for general travel is easy, but using it in combination with puzzles or as a restriction to reach certain places it can become much more complex.
That is why I pointed you to the tutorials - you first need an overview what is possible in the default engine before you can even try to use events or plugins for more complex variations.

and the "simple playerinvehicle switch" is more complex than you think, because in the default the boat can be used without any effect on any switch, and the conditional branch is the only place to check for the vehicles (on page three of the conditional branch options) without needing any switch at all.
I had almost this exact problem once. Here's one way to do it:

Set the bridge up as a three page event.

Page 1 has no conditions, is the same priority as the player, and triggers on player touch. Have it check what direction the player is facing. If the player is facing to cross the bridge, have the event turn on Self Switch A. If the player is facing to go under the bridge, have the event turn on Self Switch B.

Page 2 has the condition if Self Switch A is On, is beneath the player, and runs automatically. Set Movement Route for player to take 2 steps forward, wait for completion, turn Self Switch A Off.

Page 3 has the condition if Self Switch B is On, is above the player, and runs automatically. Set Movement Route for player to take 2 steps forward, wait for completion, turn Self Switch B Off.
or use a passages plugin (like ocram_passages), which use regions.
if you hit the region, the other is above, otherwise the same or below.

it's a easy plugin to make.

another way if you want to event it, is to use a hitbox plugin
to specify the width/height or vice versa, on player touch, the switch
is ON, and in front of that or behind, the switch is OFF to control it.

it's plain easy that way 🙂

there are more methodes, easier, complex, depends what you want,
but the setup I give is most basic version of it.

Original thread: https://forums.rpgmakerweb.com/threads/vehicle-switch-bridges.142960/