Tsukihime 1,489 Posted August 22, 2012 (edited) 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 August 23, 2012 by Tsukihime Share this post Link to post Share on other sites
Tsukihime 1,489 Posted August 23, 2012 (edited) 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 August 23, 2012 by Tsukihime Share this post Link to post Share on other sites
Pikalyze 4 Posted January 4, 2013 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) Share this post Link to post Share on other sites
Tsukihime 1,489 Posted January 4, 2013 Use End Phase Triggers to run when all enemies have been defeated. Share this post Link to post Share on other sites