aaronmanners
Member
I'm having some trouble figuring this out, and I know it's a fairly simple solution, I just can't get it.
[rgss] Â def draw_actor_parameter(actor, x, y, type)
  case type
  when 0
   parameter_name = Vocab::atk
   parameter_value = actor.atk
  when 1
   parameter_name = Vocab::def
   parameter_value = actor.def
  when 2
   parameter_name = Vocab::spi
   parameter_value = actor.spi
  when 3
   parameter_name = Vocab::agi
   parameter_value = actor.agi
  when 4
   parameter_name = "SP"
   if actor == 1 then
    parameter_value = $game_variables[3]
   elsif actor == 4 then
    parameter_value = $game_variables[4]
   elsif actor == 3 then
    parameter_value = $game_variables[5]
   elsif actor == 2 then
    parameter_value = $game_variables[9]
   end
  end
  self.contents.font.color = system_color
  self.contents.draw_text(x, y, 120, WLH, parameter_name)
  self.contents.font.color = normal_color
  self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2)
 end
[/rgss]
More specifically,
[rgss]Â
  when 4
   parameter_name = "SP"
   if actor == 1 then
    parameter_value = $game_variables[3]
   elsif actor == 4 then
    parameter_value = $game_variables[4]
   elsif actor == 3 then
    parameter_value = $game_variables[5]
   elsif actor == 2 then
    parameter_value = $game_variables[9]
   end
[/rgss]
Currently, it displays nothing, not 0, just a space. How can I make it so it will show the different variable based on which actor it is used for?
(I'm adding SP to the Status menu)
Thanks in advance
Edit: Figured it out. Did it by confirming actor.name. Case closed.
[rgss] Â def draw_actor_parameter(actor, x, y, type)
  case type
  when 0
   parameter_name = Vocab::atk
   parameter_value = actor.atk
  when 1
   parameter_name = Vocab::def
   parameter_value = actor.def
  when 2
   parameter_name = Vocab::spi
   parameter_value = actor.spi
  when 3
   parameter_name = Vocab::agi
   parameter_value = actor.agi
  when 4
   parameter_name = "SP"
   if actor == 1 then
    parameter_value = $game_variables[3]
   elsif actor == 4 then
    parameter_value = $game_variables[4]
   elsif actor == 3 then
    parameter_value = $game_variables[5]
   elsif actor == 2 then
    parameter_value = $game_variables[9]
   end
  end
  self.contents.font.color = system_color
  self.contents.draw_text(x, y, 120, WLH, parameter_name)
  self.contents.font.color = normal_color
  self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2)
 end
[/rgss]
More specifically,
[rgss]Â
  when 4
   parameter_name = "SP"
   if actor == 1 then
    parameter_value = $game_variables[3]
   elsif actor == 4 then
    parameter_value = $game_variables[4]
   elsif actor == 3 then
    parameter_value = $game_variables[5]
   elsif actor == 2 then
    parameter_value = $game_variables[9]
   end
[/rgss]
Currently, it displays nothing, not 0, just a space. How can I make it so it will show the different variable based on which actor it is used for?
(I'm adding SP to the Status menu)
Thanks in advance
Edit: Figured it out. Did it by confirming actor.name. Case closed.