This article is to cover a script in RPGMaker Ace by Hime Works, Namely the Custom Event Triggers script. I’ll be covering its overall usefulness, the application of these additional triggers in managing parell processes. Also why this is a great utility as a whole to have while developing in a game engine to have said triggers available. The basic structure and simplicity of RPGMaker Ace for event triggers can be nice, but it has its shortcomings. This script is a step in the right direction for making up for some of these shortcomings.
Player_Leave
Will be the trigger that I'll cover first, This is a trigger that’s activated when a player leaves the event they pass over,That's below the charcter, Though there's a way you can accomplish this with utilizing “Player_Leave” as a trigger,You can do this by Putting the event below the character’s priority,Then Causing X switch to activate and when X switch activates, it triggers events that you have set the perimeter for in the events pages beforehand. Though this is a way to accomplish this without the use of this script, it involves changing the character transparency to 0, scrolling the map around appropriately with the stuff you want to show and running either a autorun event or parallel process and as well making sure they are timed properly and end properly,which is normally a pain to time properly. Because if you don’t, the game can freeze up and any sound effects in the event will play on a loop,etc, etc. Overall though this is a poor solution and is more likely to have game breaking bugs,that would force your player to restart it or only fixable by the game dev releasing an update,this is due to the nature of a parell process. As a player that can be very frustrating mechanic to deal with, not to mention proper timing is nightmare this way and making sure the transparency turns back to normal.So this trigger makes a rough job alot easier to deal with.Here's a example and demostration of how to use comments to set when to use these triggers and how to set it to the region id.
Timer_Expire
This trigger is very straight forward and it’s just how it sounds. You start a timer and when said timer expires, It will trigger the events and process you set up in that event to completion, thats ya set in the comment function. A alternative way that you can accomplish this is by using a wait event and averaging out the frames that it would take equal to (xx) seconds, But this method is very limited, cumbersome and the timers are short.So some of the parts of that event would become inappropetly repetitive to program properly and accordingly, But For some events this works just fine anyway.In cases in the example video below “A bomb is gonna explode after 10 minutes,unless you can disarm it.”, It’s a lot more cumbersome and honestly you’re gonna have to crunch some numbers out and figure out how many frames ya would need to equal the seconds it would be in total. Even though most game’s that are made in this engine average about 60fps,but have little to no way guarantee it hiccup on the fps. So you get the idea why this is a poor solution and the value of this trigger. (Also to clarify a bit, any event with a timmer command on the said map your using the trigger in and whichever timer comes first also.)
Region_Enter & Region_Leave
These two triggers are useful to make npc/events seem more intelligent and help traps work more organically, It functions similar to a "player's touch" trigger in a lot of ways,except it uses players touch with Region Spefic id's.Here's a example of this along with a example of how to set it up,Lets say our player finds a garden that’s being protected by a guard,Then our player decides to goes inside of it, Because of it a npc tells them to get out of their before they crush any crops.Then you set a self switch on, that causing the Event to switch over to the proper another event page, so the next time the guard will attack the player instead. Now let us take that roughly the same context and apply it to when a player leaves a region instead. It can toggle the self switch back off so the players safe,for now,unless he enters it twice or steps ons aid crops. Another example of “Region_Leave” would be the player is detained and told to stay put and wait for the guard to come back while another one watches him, if the player leaves that spot/area it’ll trigger a guard to say ”I said stay put!” or attack them. Both of these commands also make a list of the region id’s on said map also when triggered..
Event_to_Event
This one sets it up so only event (XXX) can trigger another event, rather than just any event touching it. It can also be set to be activated by players touch by denoting appropriately (The players event id is -1 bwt,but thats explained in the script itself also).It comes in handy for making cutscenes, traps or puzzles in the game itself. A example of this is a few npc’s walks over a bridge and the first npc makes it and when the second one crosses the bridge, It collapses and they fall into a raging river below when they touch (xxx) event.also another example is one pc ignores you no matter what you do untill a chick he likes gets closer to him,So as to not look like an jerk.
Now finally we’re going to cover using these triggers as a parallel processes in general ,this can cause parallel processes to act diffrently then normal, if you put the proper commands in the comment section of the event itself its a effective tool to help manage them properlyw ithout looping issues.It modifies it so instead of it starting and running constantly, or causing more than one event to run at the same time. It will wait for the custom triggers condition to be met first and hence aid in appropriately timing them. Which comes in handy for timing parellel events much more easily than just setting a bunch of wait commands over and over again, Also once again you have to crunch numbers out and still their is no guarantee it’ll be timed properly. This helps make sure that parallel processes are timed appropriately and everything goes as planned. That about covers it roughly, Thanks for reading, I hope this helps clarify things for you and have a good day everyone.