Battle Result Switches
2016.11.13
by Shaz
Introduction
This script is a port of my MV plugin which allows you to turn on switches when a battle is won, lost, escaped or aborted, which you can then use to trigger common events or map events. Â This makes it possible to trigger actions based on the results of random encounters, similar to what's possible when calling battles from map events.
How to use
Save to a new script slot below Materials and above Main
Find this section of code, just below the header info:
Code:
module SHAZ
module BRS
WIN = 0
LOSE = 0
ESCAPE = 0
ABORT = 0
end
end
For each outcome you wish to monitor, enter the id of a switch to be turned on when that result occurs (no leading zeros). Â Remember to name your switch so you don't accidentally use it for another purpose.
A value of 0 means no switch will be turned on when the battle ends with that outcome. Â If you JUST want a switch turned on when a battle ends, regardless of the outcome, use the same switch id on all possibilities.
Script
download from pastebin
Credit
- Shaz
Terms
- free for use in commercial games
- do not post elsewhere