Multiple event triggers?

Say, somewhere in the dungeon there is a lightning ward.


Every second, the ward will strike the party with lightning for 10 hp damage.


#So you put it as; trigger: parallel -> wait 60 frames -> change hp, entire party, -10.


But the party can rush to the ward to disarm it quickly and prevent further damage.


#So you put it as; trigger: action button -> erase event.


But of course you can only set 1 trigger at time, is there a way to stack them together in a single event page?
I would suggest making the lightning trap consist of two separate events.


1. First, I would make the one that will appear on the map.  Set it to action button to trigger and have the scrip flip a switch on (not a self switch) and give it the graphic you want.  Let's call the switch Deactivate for clarity's sake.


2. Second, set a kind of tripwire event with three pages.  


-The first will have the trigger player touch, set to below players, and have no conditions.  In the scrip section, have it flip a self switch on (let's just assume switch A).  This will let you activate the trap once the player crosses a threshold of your choosing.   Simply copy this entire event once you get it working as you want, and then paste it over every spot you want the party to trigger the lightning trap.


-The second page will be your parallel event with the condition of self switch A from the first page.  For the script add your hp damage and the wait 60 frames commands (I'm not sure if you would want to place this inside an endless loop or if the event will automatically loop it while conditions are met).  


-The final page will be a blank script with the condition of the Deactivate switch from the first event being on.


Should be pretty simple.  Let me know how this works out for you.
Parallel process events loop by default.  So you do not need to put a loop inside the second page.


I'd suggest some changes to the above.  First, parallel process events loop by default, so you do not need a loop on the page that causes the lightning.


Second, if you're going to have multiple events do the triggering, do you want to increase the lightning strikes each time another event is triggered?  If you have them set to wait 60 frames (1 second) between lightning bolts, and the player triggers 3 of them, that means you're going to have 3 lightning strikes every second.  If that's how you want it, follow #2 above.  However, if you only want one of the events to trip it, and subsequent events make no difference, I'd do it slightly differently - like this:


Event #1 as above - turn on a switch to deactivate.


Event #2 has no sprite, is set to parallel process, and is conditioned by a switch called activate.  It will have the lightning and hp damage every 60 frames.  Also give it a second page, conditioned by the 'deactivate' switch, with no other changes to that page.


Event #3-#? will be identical, and will have no sprite, be set to below characters, and triggered by player touch.  They will simply turn on the activate switch.  Also give them a second page, conditioned by the 'activate' switch, with no other changes to that page.


This way, when one of the trap events is triggered, a switch will be turned on to activate the lightning.  This triggers event 2 which loops automatically, showing the lightning and causing damage once every second.  No matter how many of the trap switches you walk over, this looping will stay at 60 frames.  Finally when the player reaches the goal event, it deactivates everything.
Well, I'm more interested in stacking event triggers since it reduces the number of events on the map. (my map is kinda messy atm)


But anyway, I just discover that Hime_CustomPageCondition.js plugin actually loop the custom condition as parallel event.


Maybe I can exploit that.

Original thread: https://forums.rpgmakerweb.com/threads/multiple-event-triggers.65493/