RGSS Script References
What is the @ in RGSS scripts?
Description of the @ Syntax of the scripts in RGSS
Defines an instance variable for a class. To be able to read and write variables of this type you also need to create accessor methods for them. You can also use the attr_reader, attr_writer, or attr_accessor shortcode to load the relevant operators automatically.
Code Example:
def initialize
@battler_name = ""
@battler_hue = 0
@hp = 0
@sp = 0
@states = []
@states_turn = {}
@maxhp_plus = 0
@maxsp_plus = 0
@str_plus = 0
@dex_plus = 0
@agi_plus = 0
@int_plus = 0
@hidden = false
@immortal = false
@damage_pop = false
@damage = nil
@critical = false
@animation_id = 0
@animation_hit = false
@white_flush = false
@blink = false
@current_action = Game_BattleAction.new
end