Removing party members when mana hits 0.

As it stands, I have 8 parallel processes running in common events at all times to get this to work, and it's really bogging my system down.
I was wondering if any of you could make this into a script instead? I'm currently learning Javascript, but I don't have the knowledge to do it myself at the moment (lacking a lot of terms for in game stuff as well). Hopefully I can also read the end product of this, and it will help me learn more about the code.


Basically what I have is a system that removes party members from your party when their mana hits 0, (mana in this game is used as a different resource) and prints on screen "[Name of actor] has succumbed to madness." This not only removes them, but also turns on a switch so that an event in town can be triggered, allowing them to rejoin your party once you return to the main hub.
If Actor 1 loses all his mana, he is teleported back to the main hub.


If anyone could write this for me, I'd really appreciate it. It would not only help my game run much smoother, but it would also greatly improve my knowledge of scripting in general.


Thanks for your consideration! Please let me know if you need any more details ^ ^

 
I'll look into this. Doesn't sound too hard but I'll want all the specifics.


Basically if mp = 0 you want them to "succumb to madness" then be removed from the party and turning on a switch for them to rejoin.
How will they join? Cutscene, just join once you return. So on?
I'll look into this. Doesn't sound too hard but I'll want all the specifics.


Basically if mp = 0 you want them to "succumb to madness" then be removed from the party and turning on a switch for them to rejoin.
How will they join? Cutscene, just join once you return. So on?



The switch will make an event in town active. That event will be their character sprite, and once you talk to them they will rejoin your party. That part is easy enough for me, I just need the JS to turn on the switch since I don't know how > <
Alright. I'll see what can be done.
Awesome!!
Plugin should be completed tomorrow. Since it's personalized to your specific game I'll probably just message it to you.

Original thread: https://forums.rpgmakerweb.com/threads/removing-party-members-when-mana-hits-0.73748/