It's not game variables, I know how to change them. See, I have this in a script I'm making:
@show_party_characters = trueI want to be able to change that to false through a script call.
You're not giving us enough context. We don't know what class that instance variable is defined in. As a general rule, however, changing instance variables on a specified instance is relatively simple: add an attr_accessor or attr_writer keyword to the class, and the instance variable can be assigned to through a generated method.
class Example attr_accessor :message def initialize(message = 'Hello, world.') @message = message endendexample = Example.newexample.message = 'Like this.'puts example.message # => "Like this."Adding an accessor automatically creates reader and writer methods for the instance variables sent to the keyword you used (remember to use symbols as arguments to the keyword). If you have an accessor for the above example, it would generate Example#message and Example#message= methods for you which reference the appropriate instance variable.Also, in response to Andar's reply, global variables are always public and writeable -- that's the point, they're global. You can't create a private global variable. With that said, instance variables also don't automatically generate global variables, so $show_party_characters would evaluate to nil unless that
global variable was defined -- the example AriArk presented was an instance variable.
Edit for the pedantic: Technically, the attr_* 'keywords' are actually methods, not proper Ruby keywords. Regardless, they're used as keywords (much like a number of other Ruby methods), and I think it's generally less confusing to refer to them as such.