Custom Event Triggers

This script provides additional event triggers.
The built-in event triggers include

  • Action Trigger
  • Player Touch
  • Event Touch
  • Autorun
  • Parallel Process

This script provides additional triggers such as Player Leave, Event-to-Event, and Timer Expire

event_customTriggers0

Download

Script: download here

Installation

Place this below Materials and above Main

Usage

To specify a custom page trigger, create a comment of the form

<page trigger: trigger_name>

Where 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.

Parallel Triggers

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.

event_customTriggers4

Reference

Here is a list of available triggers and a description about them.

Player_Leave

Triggered when the player steps off an event. Note that this means the
event must have below-character priority.

event_customTriggers1

Timer Expire

Triggered when the game timer counts down to zero. The timer must be counting down in order for these events to trigger.

Event_On_Event

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.

event_customTriggers2

Region_Enter

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.

event_customTriggers3

Region_Leave

Triggered when the player leaves a region. It takes a list of region ID’s as extended data.

You may also like...

58 Responses

  1. Matthew says:

    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)

    • Hime says:

      If you had each waterfall display a message, do they still do nothing?

      • Matthew says:

        Yes, they all do nothing except for the one with the lowest id

        • Hime says:

          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.

          • Matthew says:

            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

  2. Matt says:

    Will there be an MV plugin for this? I desperately need this script to make my project work.

    • Hime says:

      It is on my to-do list. Are there any particular triggers that you need?

      • Matt says:

        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.

      • Robert says:

        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.

  3. mtx says:

    How can I use event_to_event but with option Through enabled?

    • Hime says:

      I don’t think that would be possible, given the default event touch functionality does not support through events.

  4. Purest Prodigy says:

    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?

  5. koldsack says:

    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.

    • koldsack says:

      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 🙂

    • Hime says:

      When I use the same page trigger with a set of ID’s specified, the player is unable to activate it.

      • koldsack says:

        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.

        • Hime says:

          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.

  6. desukarhu says:

    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.

    • desukarhu says:

      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.

    • Hime says:

      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.

      • desukarhu says:

        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!

  7. Der Krakel says:

    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?

  8. basicleader says:

    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! =)

  9. basicleader says:

    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?

    • Hime says:

      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?

  10. Dimas Farhan says:

    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

    • Hime says:

      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?

  11. Chris says:

    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?

    • Hime says:

      WordPress ate your note-tag. I’m assuming you wrote something like

      <page trigger: event_to_event>
      

      Do it in a new project to verify that it is not a script compatibility issue.

      • Chris says:

        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? 🙂

  12. Itoken says:

    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
    the page)
    then on the page itself :
    @comment:
    @Text “Hi!”

    So I set event 1 (set move route) to hit event 2, but nothing happens, please help

  13. mwm5 says:

    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……

    • Tsukihime says:

      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.

  14. Tsukihime says:

    Added new trigger: “event_to_event”

Leave a Reply

Your email address will not be published. Required fields are marked *