Common Event Conditional Branch Switch off script call not working?

I'm using Victor's ATB Script, and I'm wanting to make a Common Event where there's a switch, and when said switch is turned on, the ATB is set to 'Active' mode. And when its off, its set to 'Wait(semi-wait)'. (Like in the Final Fantasy games.)

However, I've been trying everything, and for some reason, it works fine, until I turn the switch off to set it back to Wait.
I've done what the description of the ATB script says, the '$game_system.wait_mode = X' script call, however when I turn said switch off after I already turned it on, it still acts as if it's set to on, and makes it set as Active.
Am I missing something?

(Also, I'm also using Yanfly's System Options Script to make it to where I can adjust the switches to where I can set the switch to active or wait.)

Here's a screenshot of the Common Event I did.
Moved to: RGSSx Script Support
You would be better off to use a variable then the player could set to full wait as well. That's my preferred choice.
add this below VE ATB
and change the switch number to whatever one you use
Ruby:
class << BattleManager
  alias r2_change_atbwait   wating?
  def setup_initial_atb
    r2_change_atbwait 
    if $game_switches[2] == true
      $game_system.wait_mode = :active
    else
      $game_system.wait_mode = :semi_wait
    end
  end
end
You would be better off to use a variable then the player could set to full wait as well. That's my preferred choice.
add this below VE ATB
and change the switch number to whatever one you use
Ruby:
class << BattleManager
  alias r2_change_atbwait   wating?
  def setup_initial_atb
    r2_change_atbwait
    if $game_switches[2] == true
      $game_system.wait_mode = :active
    else
      $game_system.wait_mode = :semi_wait
    end
  end
end
Thx a lot! Really appreciate it.
I really need to learn how to code and such.
Feel free to close this.
Thread closed

Please report your posts and ask for them to be closed in future. Do not assume a mod will see the request as a single line in a larger post in a larger thread.

Original thread: https://forums.rpgmakerweb.com/threads/common-event-conditional-branch-switch-off-script-call-not-working.142721/