This script provides additional event triggers.
The built-in event triggers include
- Action Trigger
- Player Touch
- Event Touch
- Parallel Process
This script provides additional triggers such as Player Leave, Event-to-Event, and Timer Expire
Script: download here
Place this below Materials and above Main
To specify a custom page trigger, create a comment of the form
<page trigger: trigger_name>
trigger_name is one of the available custom event triggers. The reference section lists all of the available custom triggers.
Extended Trigger Data
This script adds “extended data” to the trigger.
Certain triggers may use this data to determine how to run.
The general format for extended trigger data is
<page trigger: trigger_name ext_data>
Where ext_data is any string. Check the reference to see what kinds of
extended data may be required for each trigger.
A custom trigger can be used as a condition for starting a parallel process. If the activation condition is met, then the event will begin running as a parallel process. This will not stop until the page changes.
Here is a list of available triggers and a description about them.
Triggered when the player steps off an event. Note that this means the
event must have below-character priority.
Triggered when the game timer counts down to zero. The timer must be counting down in order for these events to trigger.
Triggered when an event comes into contact with another event (using the
“event touch” rules). Takes a list of event ID’s for extended data. Only the specified event ID’s can trigger this event. When no ext data is specified, then any event can trigger this event. Use -1 if you want the player to trigger it as well
For example, if EV1 has the ext data “2 3”, that means EV1 can only be triggered by EV2 and EV3. It does NOT mean that EV1 triggers event 2 and event 3.
Triggered when the player enters a region. This is not checked if you are already in the region. It takes a list of region ID’s as extended data.
Triggered when the player leaves a region. It takes a list of region ID’s as extended data.
So I’m having a problem with region_enter. I have an event for the animation of a waterfall with 7 pages. 6 of them have on them, with ext_data being regions surrounding the waterfall. Each plays a waterfall BGS at different volumes depending on how close the player is to the waterfall, but only the page with the lowest region id works properly. The others just do nothing (except for the one that has no custom trigger)
If you had each waterfall display a message, do they still do nothing?
Yes, they all do nothing except for the one with the lowest id
I just tested region_enter. Each event simply makes a script call to print their event ID to the console, and all 4 are executed.
When I had each event display a message, the messages are all displayed.
Maybe there is a script compatibility issue.
Ok. I put in under all other scripts except main, don’t have any other scripts installed except small ones I have made, but none of those effect events, maps or regions at all. Also, in my game, there is only one event, but with multiple pages. If I use many different events it works though. Is it just an issue with multiple pages, or is there another issue that could be fixed. Because it gets to be a bit much with all the events I need for my purposes
Will there be an MV plugin for this? I desperately need this script to make my project work.
It is on my to-do list. Are there any particular triggers that you need?
The Event-on-Event trigger is the one I really need. I need monster to explode when they touch debris on one map. I have been using XY coordinates… but with 22 pieces of rubble and 30 monsters, it is getting out of hand! (I’m not even half done and I have typed in several hundred XY coordinate commands!). Event-on-Event triggers would make this MUCH easier.
I will explore some solutions and determine how it can be best implemented.
I will be beyond grateful for this one if you have the time to put it together.
For me, the player_leave event, region_enter and region_leave were super effective for making really fun puzzles and traps. Thanks for making this. This is really an invaluable tool you’ve created. I hope to see it remade for MV eventually.
How can I use event_to_event but with option Through enabled?
I don’t think that would be possible, given the default event touch functionality does not support through events.
Does event to event not work if your event priority is below the player? I want a switch to turn on when pushing an event on top of another one am I doing something wrong or is this script inappropriate for what I’m trying to accomplish?
I've updated the script so that events will check if they're touching anything under them. See if that works.
Thanks Hime it works wonderfully now.
Hime, not sure if it’s a bug, but are “event touch”-type event always triggered by player char upon contact? Say, i have event 1 set to “event contact” with the tag: page trigger: Event_To_Event 14, the player would still trigger it even without the -1 ext data upon contact.
Event 14 trigger it just fine, though it’d be better if the event ignores the player char upon contact unless specified.
To alot of the folks here: actually the events do work upon touch by autonomous movement, it’s just that they DON’T overlap, irregardless if you set it above or below characters. which means if you set the behaviour of event 14 to move to event 1 to trigger it, it would, but it will be repelled one step away from it’s course. Hence one’s set movement thus gets thrown off course or halt upon contact.
Hime, if you can figure out how to make events overlap each other, it would be a nice feature. At present, only player chars and co. do that when events are set to either above or below characters.
oh wait, scratch the overlap thing. it is possible to have events overlap, so long as there is nothing specified for event graphic. tis pretty cool this script, i’m using it to have vehicles move around randomly 🙂
When I use the same page trigger with a set of ID’s specified, the player is unable to activate it.
sorry hime, found out apparently that it was the mouse script and not the player char itself causing event contact activation. the mouse cursor also ignored all ext data rules, clicking on an event made some of the vehicles go the opposite direction and vice versa.
The mouse script likely has its own set of event trigger checking apart from the player and events, though it would be strange for it to happen because an “event to event” trigger is not the same as an “event touch” trigger. I suspect the mouse doesn’t even check what type of trigger it is and simply activates the event.
I think I'm having some problems with event_to_event. Or I'm using it wrong dunno.
I have an event1 that's parallel process with "<page trigger: event_to_event>" comment on top, now when I use move route to make event2 touch this event1 the event1 commands won't loop properly like parallel process should. And if I have wait commands the event processing just stops there.
I think figured out the cause myself, but don't know how to fix it or if it can be fixed. It's because of the event movement frequency, if it's set to normal any wait commands over 40 won't have time to process as the events keep bumping into each other and resetting the event.
There seems to be multiple issues with it. For example, if you trigger an event that is already running on parallel process, you will double-trigger it. Will have to see how to address it.
I'll just clarify a bit what I'm trying to do with the events. When they move route touch each other I want them to engage in "combat" so on event1 I have commands that decrease their "health" variables and play attack animations. But if I can't use wait commands the variables decrease way too fast.
If I change the default trigger of the event from "Parallel process" to "Action Button" (with the event_to_event script trigger) the event works except that it makes everything on the map wait with the wait commands and that's not good enough I think.
Would be awesome if you could help me figure out a workaround for this!
How about turning on a self-switch and changing to a regular parallel process page?
Awesome, thank you. So far that works perfectly, didn't even think about that.
I suck at using scripts. :C
I successfully added your Script down at Materials (and above Main)
But then I´m still unable to make an event trigger another event.
My idea was
– a tight hallway (only 1 person can go through.)
– butler blocking the way,
– little chat with the butler using Show Text
– then he walks down the hallway.
– a door is in his movement path.
– he opens it and keeps walking (door animation event triggered by butler touching it.)
– door stays open for now.
– butler goes to new position (self switch to keep him there, changing his text in a new event tab.)
– the door however resets every time the hero re-enters the hallway map (and is able to walk through it just like the butler did.
I really wanted that door there, but I don´t want to melt it´s animation into the butlers movement event.
I tried this ext data thing as an event´s comment, like you did in the picture, but the door isn´t
opening and the butler´s not getting further, literally freezing the game.
what did I do wrong?
You'll have to show your event.
I just wanted to make my parallax making life even easier in fact! But for now, I’m just cutting my layers in multiple pieces to make the map depth (in front or behind the character) efficient! =)
If it’s not possible to add this option, it’s okay, as it already works fine! =)
Just to be sure, have you had any experience or feedback about incompatibility with Victor Sant’s scripts (all the character movement, multi-frames… and the fog and overlay one) ??? Thanks for your time! =)
No, I have not seen any reports like that. Such functionality could be supported, but not through this script. This script just triggers events; it doesn’t change how other things movement work.
Thanks a lot =)
Great script! I’m using it for my parallax mapping! Works wonder! I was just wondering if you think it would be possible to make this script behaves a bit differently, that is, I would need the region_leave and region_enter to trigger as soon as it happens.
To give you an example, i’m on the border of my region 1, and I setup a “leave_region 1” on my map, that triggers a dialog for example! I would like this dialog to be triggered as soon as I move my player, meaning when he is walking towards the next tile, and not when he is arrived there!
The same way around for a region_enter which would trigger as soon as the player is moving TOWARDS the region 1 tile, and not only after he is arrived in the region.
Do you think this would be a possible change?
The region is not changed until the player finishes moving, which is why the event is triggered after the player reaches the destination. You can probably change that with other scripts.
What are you trying to do?
i think i found a bug…
If combined with Mog Sensor Range script, the “action button” becoming like “parrarel process”.. I didn’t even touch the event. Just standing near the event, but suddenly it triger the action button event. So, if possible please fix this. Thanks 😀
Sorry for bad english :v
I don’t know how that script works but you’re saying when you insert the motion sensor script, all “action trigger” events automatically trigger when you stand near them?
I’m having trouble with the “Event_to_Event” trigger. It just flat-out seems to not work. You’re supposed to insert a comment that says “” right? This doesn’t seem to work for me. Is there anything else required?
WordPress ate your note-tag. I’m assuming you wrote something like
Do it in a new project to verify that it is not a script compatibility issue.
Ahh, figured it out. I’m having the same issue as the other lad on here. You can’t use “Set Move Route” commands to trigger the “Event_To_Event” events.
Is there any amount of money I can pay you to get this behavior to function the way I need it? 🙂
Hello, tried your script, somehow I did something wrong. I want the event to event trigger to work.
Seems nothing happens if an event touches the other event:
Example: Event 1 = nothing written in the page / event 2 (trigger=event touch (lower left of
then on the page itself :
So I set event 1 (set move route) to hit event 2, but nothing happens, please help
You need to use the event_to_event trigger in order for an event to be triggered by other events. This script doesn’t change how “event touch” works.
yes I added the comment
page trigger: event_to_event
but nothing happens.
Ok somehow I understand the problem. When the character event walks up to character “event_to_event” using Autonomous movement then it triggers it. But when
you use the movement route in the page, it does not trigger it,.
Yes, that is default behavior I did not change that.
Um…this script seems useful and…… Why not combine your event-trigger-labels script together with this one？ (http://himeworks.com/2012/10/21/event-trigger-labels/) What I mean is I think these two scripts is similar It’s just my advice, not demand, forgives my poor English……
Event trigger labels is only for action triggers. It allows you to run different sets of commands by pressing different buttons. Also, it is a bad idea to combine scripts because if one of them happens to have compatibility issues with other scripts, then everything is now incompatible.
Ok I know.
Thank you for your explanation.
Added new trigger: “event_to_event”