じ☆ve冰风 发表于 2026-8-1 16:54:42

Battle Result Switches

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


本贴来自国际rpgmaker官方论坛作者:Shaz处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/battle-result-switches.70928/
页: [1]
查看完整版本: Battle Result Switches