How do you reset switches?

● ARCHIVED · READ-ONLY
Started by jonathan4210 5 posts View original ↗
  1. I already figured out how to reset self-switches and variables, but I get an error for resetting normal switches. Here's my code:

    $game_switches[1..100] = false
    $game_variables = 0
    $game_self_switches =
    Game_SelfSwitches.new

    I attached the error message to this post, and this is where it points at in the script:

      #--------------------------------------------------------------------------
      # * Set Switch
      #     switch_id : switch ID
      #     value     : ON (true) / OFF (false)
      #--------------------------------------------------------------------------
      def []=(switch_id, value)
        if switch_id <= 5000
          @data[switch_id] = value
        end
      end
    end

    I tried $game_switches[1...100], $game_switches[1..5000], and $game_switches[1...5000]. Nothing works.

    Untitled.png
  2. I'm curious... Is there a reason you're not using the Control Switches > Batch eventing command?
  3. Lunarea said:
    I'm curious... Is there a reason you're not using the Change Switch > Batch eventing command?
    I don't know what that is :p . Will that help?
  4. Oh wow! I didn't know that. Thanks :)
  5. You're welcome! :)

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.