Common Event to Script

Hello everybody I'm seeking for somebody to turn this common event into a script for me.

Firstly let me explain my issue.  I run an ABS game which means everything happens on the map, there is no battle scene so everything is already a bit event heavy.  

I have various systems which need to constantly be updated and I do this through parallel common events, but this places a burden on the rest of the game and causes heavy lag in bigger maps with alot of events, when I disable the parallel feature the lag stops as well, that how I isolated the problem to being coming from the common events and their wait commands.  

What I'm looking for is somebody to help me turn this common event into a script that updates regularly without bogging down my framerate.  

The Common Event is simple:


(Please make applicable to party leader - not by ID, as there is only ever 1 character present but there are multiple characters.)

 
Well it's been a while, I'm gonna bump this since it would really help me out :/
Try adding a Wait 10 Frames at the very start of your common event. See if it makes a difference.


What's calling it? I don't see a parallel process trigger and a switch. If it's running repeatedly, that means there's another event somewhere (probably set to parallel process) that has a Call Common Event command. Maybe THAT one needs to be changed to have a bit of a wait at the start. In fact, I'd look at that first.
I had the trigger and switch disabled when it was tinkering around, forgot to turn it back on for the screenshot, normally it is running continuously (parallel) and does have a trigger.

That said it seems to be the wait commands that cause the stutter.   They're there because else not the Common Event would try updating 60 times a second obviously, however when the wait command is added I go from freezing to stuttering - and only slightly, I lose maybe a couple frames of the 60, just enough for it to really bug my eyes - it doesn't do much to placate the situation. (It doesn't help I have multiple (4) parallel common events running and updating on different wait times, that is playing part in this so eliminating them is a good step ahead.)

Ideally as well with the nature of this event and it's purpose (*checking health and outputting it to HUD if you're in critical condition*) It is better for it to have a response time of 60 frames or less.

I did try adding the 10 to the beginning just in case but no dice.      
I think a parallel process will start over if there's too long a wait period. Can't be sure on that - would have to do some tinkering myself.

Original thread: https://forums.rpgmakerweb.com/threads/common-event-to-script.36367/