[rgss]module Switches
def self.turn(state,*values)
state = true if state ==
n
state = false if state ==
ff
values.each {|v| $game_switches[v] = state}
return
end
end
[/rgss]
Switches.turn(true,1,2,3,10) or Switches.turn
on,1,2,3,10)
(All those switches will be turned on)
Switches.turn(false,1,2,3,10) or Switches.turn
off,1,2,3,10)
(All those switches will be turned off)
This only works with $game_switches, but can be edited to it also works with other kinds of switches.