gurvmlk 6 Posted August 4, 2016 I have an event where the player talks to an NPC, then a lengthy timer starts. After the timer expires, the player can revisit said character for a reward. Things were going fine until I discovered during testing that the game automatically ends battles if the timer hits 0. I can't be having that, especially since this particular timer has no relationship with game progress, but I haven't been able to come up with a functional solution. Common events don't run during battle, so I can't use them to stop the timer, nor can I use them as a makeshift timer with variables. Battle events don't activate with enough precision to trigger immediately when the countdown hits :01 to stop the timer before the battle is aborted. The only solution I've been able to come up with is putting some kind of warning of the issue in the game so the player knows to be wary around triggering battles as the timer his closing in on 0, but that's just sloppy. The only possible solutions I can think of now are either a way to make it so either timers don't abort battle, or common events run during battle. Assuming scripts or methods of those exist however, those would pose problems of their own because I have other timers that do benefit from aborting battles (i.e. those tied to game overs), as well as common events that depend on not running during battle (i.e. those that passively control certain variables). Therefore, those possible fixes would need to be capable of specifying themselves to individual circumstances. It seems like a hopeless endeavor, but if anybody has any helpful advice I'd certainly appreciate it. Share this post Link to post Share on other sites
Lord Vectra 414 Posted August 4, 2016 class Game_Timer alias on_expire_bubs_switch on_expire def on_expire switch_id = 71 on_expire_bubs_switch unless $game_switches[switch_id] # alias end end This says if switch ID is on, the battle will not be aborted. If it is off, the battle will be aborted. Share this post Link to post Share on other sites
gurvmlk 6 Posted August 5, 2016 Looks like it's working. Thanks again. Solved. P.S. You were only three off from setting it to the correct switch without me needing to change anything. Nicely randomized (unless that number is from your own project). Share this post Link to post Share on other sites
Rikifive 3,411 Posted August 7, 2016 This thread is closed, due to being solved. If for some reason anybody would like to re-open this thread, just send me a PM or report the thread. (= Share this post Link to post Share on other sites