How do you reset switches?

Status
Not open for further replies.

jonathan4210

Veteran
Veteran
Joined
Aug 5, 2014
Messages
70
Reaction score
2
First Language
English
Primarily Uses
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
 

Lunarea

Artist
Global Mod
Joined
Mar 1, 2012
Messages
8,840
Reaction score
7,797
I'm curious... Is there a reason you're not using the Control Switches > Batch eventing command?
 
Last edited by a moderator:

jonathan4210

Veteran
Veteran
Joined
Aug 5, 2014
Messages
70
Reaction score
2
First Language
English
Primarily Uses
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?
 
Last edited by a moderator:

jonathan4210

Veteran
Veteran
Joined
Aug 5, 2014
Messages
70
Reaction score
2
First Language
English
Primarily Uses
Oh wow! I didn't know that. Thanks :)
 

Lunarea

Artist
Global Mod
Joined
Mar 1, 2012
Messages
8,840
Reaction score
7,797
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.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,583
Latest member
write2dgray
Top