I'm trying to figure out how to change a non global variable "
@term" normally listed as
@term = $data_chants[0].name
into "
@chant" by doing this:
@fragment_1.term = @chant
Here's the two parts in more detail:
from here in:
"class Scene_Battle < SDK::Scene_Base"
i have this command, and the " p @chant.name.to_s" works fine, it only crashes on the next line:
"@fragment_1.term = @chant"
Which means my error is in my failure to properly address something, either the fragment_1 class, or the @term (I'm guessing).
if Input.trigger?(Input::C)
#play decision SE
$game_system.se_play($data_system.decision_se)
@chant = @chant_window.chant
p @chant.name.to_s
@fragment_1.term = @chant
return
end
to this window here:
#====================================================================
# Fragment 1 - super (x, y, width, height)
#====================================================================
class Fragment_1 < Window_Base #Window_Fragment
def initialize
super(100, 278, 90,42)
self.contents = Bitmap.new(width-32, height-32)
refresh
self.back_opacity = 160
end
def refresh
self.contents.clear
self.contents.font.color = text_color(0)#white
self.contents.font.size = 16 #was 20
@term = $data_chants[0].name
#@term = "ichi"
self.contents.draw_text(0, -10, 90, 32, @term.to_s)
end
def update
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end