Help with Sensory on Animated Bridge

To the point, I set up a series of events today that rose a bridge out of a pit and enables the player to walk across. That worked well enough, except for the fact that there are so many events for this large bridge that I noticed some lag. So I came to the forums hoping to find a solution.

I was wondering if anyone knows how to set up an event or of a plugin would detect the player as they approached the pit, lift the events 'up' and 'recede' when the player moves to far away. So there would be a circular platform around the player at all times while crossing the bridge, and would make for very cool visual.

I have provided a visual below of the bridge in question to give a visual of what I am talking about. As always, any help would be greatly appreciated.

Rising Bridge.PNG
I did something similair with raising and lowering tiles like that ^^
but it doesn't lag on my end, but it's also more linked as a "path shape"
that raises or lowers depending on the switches/levers/builders etc
that control them, so some raises others not, some in between so its
more event checks 🙂

but it really depends how you set it up though. I might be able to if you have
a mini techDemo that I can check for lags here and how to improve it for you.

I had alot of fun making this mechanic 🙂 but if yours is different, I might find
a way to help you out.
Thank you so much for offering help, @ShadowDragon. It is wonderful to hear that you did something similar yourself! I have never actually made a demo before, how would I go about doing that? And where would I post it?
I'm guessing you have something like 20 events all running parallel with no wait commands?

Does the player only walk straight across the bridge or can he step anywhere?
@AquaEcho, there is, in fact, 62 events running in parallel process for them to rise up smoothly, but there are wait commands. The wait commands were necessary to create the illusion of each row rising up individually. With each row further away from the player I increased the wait by 6, so: 6, 12, 18,24, etc. The player can run across the bridge once it as risen and, technically, 'chase' it across till it is finished.

I attached the pictures below of the event process. Very very basic, I know, but it was the only way I knew to get it to work. The first page is just blank.

Bridgemagic.PNGBridgeMagic2.PNGBridgeMagic3.PNG
Instead of parallel events you could have one tile remotely toggle the self switches of its adjacent tiles when the player touches it using this command
$gameSelfSwitches.setValue([map, event, selfswitch], value)

Also I don't know why all the event pages are parallel. Shouldnt they be autoruns since they just run their commands for a few frames and then move to the next event page? Edit: Never mind, autoruns freeze the player and all other events so that's not going to work.

I would think you could use one of the several tile changing plugins since it seems like you're trying to create an effect similar to this. This one is Ritter's but since it's paywalled you can try Shaz's tile changer. They do the same thing.
I think I'd go with AquaEcho's first suggestion - which I used for a similar thing in Ace. It takes some careful planning but gives a really smooth effect without any risk of lag.
I use 2 pages for the raisng/lowering, but I use a plugin to control the animation.
but in your case, SS with a scriptcall or a region makes this smoother.

A techDemo is basicly a new project (strip it down) and only the maps required
of the issue you have, than send by DM.

but there are serveral approaches as well, as parallel 30+ should be avoided, as
page 2-3 can be left alone.

so you can also use 1-2 events to control everthing for those events 🙂 which saves
you alot of parallel events.

small Edit:
this is a tech draining water mechanic I also use (but this is also used for a much
wider variety:
a way I also use for raising pilars, and much, much more 🙂
DynamicDrain.gif

Original thread: https://forums.rpgmakerweb.com/threads/help-with-sensory-on-animated-bridge.156896/