Move route start points resetting if interrupted

Hi all,

I'm hoping that there's a simple solution to this.

What I want is for an event (a moving bridge) to move along a preset route; the player can stop it by flipping a switch. When the player flips the switch again, the bridge starts moving again.

What actually happens is that the start point for the move route is reset each time the switch is flipped rather than resuming, so the bridge ends up in completely the wrong place.

What's the best way to stop that from happening? I've tried adding an invisible event as a barrier and 'skip if cannot move', but the bridge has to have 'through' on when moving (it's moving over empty space) so that didn't work.
So from what I understand, you want a retractable bridge? Or something else.

(Screenshotting the event page would help.)
Not quite - what I want is for it to move on a fixed horizontal path, left and right. Pressing the green switch once stops it, pressing it again starts it (ignore the map layout on the screenshots - it's just to see if I can get it working).

1st event page is the move route; second is to stop it if the switch is flipped.

I also tried using conditional branches on one event page, thinking that adding a new move route if the switch was pressed would temporarily interrupt it, but it just cancelled the main one completely, so it didn't resume on the second press.

Hope that all makes sense!

EDIT: just had a thought; do you think this would work - have the event set facing right and moving forward; if it hits the invisible barrier event (using x/y parallel script) it just turns the event the other way, with another at the other end of the route? That way the move route can be 'move forward/repeat'

ANOTHER EDIT: it worked! Screenshotted the solution. I used a parallel event to make the bridge 'face' right to start with, with a 'move forward' move route in the event. The invisible bridge blocking events turn it around when it hits them
Not quite - what I want is for it to move on a fixed horizontal path, left and right. Pressing the green switch once stops it, pressing it again starts it (ignore the map layout on the screenshots - it's just to see if I can get it working).

1st event page is the move route; second is to stop it if the switch is flipped.

I also tried using conditional branches on one event page, thinking that adding a new move route if the switch was pressed would temporarily interrupt it, but it just cancelled the main one completely, so it didn't resume on the second press.

Hope that all makes sense!

EDIT: just had a thought; do you think this would work - have the event set facing right and moving forward; if it hits the invisible barrier event (using x/y parallel script) it just turns the event the other way, with another at the other end of the route? That way the move route can be 'move forward/repeat'

ANOTHER EDIT: it worked! Screenshotted the solution. I used a parallel event to make the bridge 'face' right to start with, with a 'move forward' move route in the event. The invisible bridge blocking events turn it around when it hits them

Oh wow. I was going to suggest Himeworks Tile Swap script if you wanted to make a spawning bridge using tiles, but if you got it working then that's great. 😍
Thank you! I'll check out that script anyway

EDIT: ok, I've encountered a problem. It works perfectly UNLESS I have any kind of dialogue (through normal action or parallel process). It seems to interrupt the invisible barrier parallel processes, so the bridge just sails straight through them.

I could run the map with no dialogue, but it'd be pretty boring.

Any idea if there's a way to make certain parallel processes 'dominant' over all others?

Original thread: https://forums.rpgmakerweb.com/threads/move-route-start-points-resetting-if-interrupted.144999/