Jump to content


Photo

Common Event Triggers


  • Please log in to reply
3 replies to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 22 August 2012 - 05:44 PM

Common Event Triggers
-Tsukihime

This script allows you to assign common event triggers to enemies.
When a trigger is activated, the common event will run.

The following triggers are currently supported:

-on encounter (on_enc)
-on death (on_die)
-on escape (on_escape)

It is easy to add your own triggers as well.
Simply go to the Trigger hash at the top, add in the notetag string as well as a trigger symbol, and then you can just add the trigger somewhere in the script without having to worry about parsing it.

Usage

For example, whenever you encounter a slime, you might want to run a common event.
You might tag the slime with

<on_enc: 1>

Which will run common event 1 whenever you encounter a slime.

If a slime dies, you might want to run common event 3

<on_die: 3>

Download

Script: http://db.tt/BLxO1ezX

Note

This script does not behave as expected when multiple enemies are firing off triggers. Only the last one is run. Will need a work-around.

Also note that if the last enemy dies and it has an on_die trigger, it will be run AFTER the battle finishes. Will also need a work-around.

Edited by Tsukihime, 22 August 2012 - 09:20 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.png

Go here for Bugs and Requests.

 

Want to become a beta tester for my plugins before they are released to the public?


#2 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 22 August 2012 - 08:34 PM

Script has been updated to address the issue where you can't queue up multiple common events.
Now each common event trigger will be handled properly.

I just need to implement proper battle-end event processing to address the other issue, which sort of breaks the whole on-death trigger.

If you can think of any other useful triggers just suggest them.

Edited by Tsukihime, 22 August 2012 - 09:11 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.png

Go here for Bugs and Requests.

 

Want to become a beta tester for my plugins before they are released to the public?


#3 Pikalyze

Pikalyze

    Writing Fanatic

  • Ace Member
  • 136 posts
  • LocationIn a Apple Tree.
  • RM Skill - Writer

Posted 04 January 2013 - 11:24 AM

Is there a way to add the common event after the battle ends? Not at the victory, but when the battle ends on the map. It plays the common event first, then moves on to any other events(Such as auto-ran events for cutscenes)


Nothing really?


#4 Tsukihime

Tsukihime

    Advanced Member

  • Ace Member
  • 7,120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 04 January 2013 - 01:07 PM

Use End Phase Triggers to run when all enemies have been defeated.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.png

Go here for Bugs and Requests.

 

Want to become a beta tester for my plugins before they are released to the public?





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users