RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu

[RESOLVED]Window_MenuStatus Displaying a game_variable

Started by djkdjl, October 10, 2007, 04:35:59 AM

0 Members and 1 Guest are viewing this topic.

djkdjl

Hi everyone,,PLEASE help me out!

I have an in-game-variable #139 that counts the total amount of experience gained by the hero.  How can I display what's stored in game_variable[139] in the Window_MenuStatus.

Here is the refresh method for Window_MenuStatus:
----------------------------------------------
def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors['i'] <---- this 'i' isn't in quotes,,I added quotes because html code thinks I am declaring an italics font
      draw_actor_graphic(actor, x - 40, y + 80)
      draw_actor_name(actor, x, y)
      draw_actor_class(actor, x + 144, y)
      draw_actor_level(actor, x, y + 32)
      draw_actor_state(actor, x + 90, y + 32)
      draw_actor_exp(actor, x, y + 64)  <--- this line I want to get rid of and replace it with a line that displays the contents stored in game_variable[139] roughly at the same x, y position.
      draw_actor_hp(actor, x + 236, y + 32)
      draw_actor_sp(actor, x + 236, y + 64)
    end
  end
----------------------------------------------

Thx in advance
"If u'r about to die,,then think of how good ur life has treated u up to this point.  On the
other hand,,if life hasn't treated u good up to this point,,then take joy in the fact that
it's not going to bother u for much longer."

modern algebra

    self.contents.font.color = system_color
    self.contents.draw_text(x, y+64, 24, 32, "E")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 24, y+64, 84, 32, $game_variables[139].to_s, 2)
    self.contents.draw_text(x + 108, y+64, 12, 32, "/", 1)
    self.contents.draw_text(x + 120, y+64, 84, 32, actor.next_exp_s)

djkdjl

"If u'r about to die,,then think of how good ur life has treated u up to this point.  On the
other hand,,if life hasn't treated u good up to this point,,then take joy in the fact that
it's not going to bother u for much longer."

Kokowam

Go check out the syntax books at CreationAsylum when you need to find stuff like that. I think they have that there.

djkdjl

I figured modern will bail me out faster on this one,,and he has  ;D
"If u'r about to die,,then think of how good ur life has treated u up to this point.  On the
other hand,,if life hasn't treated u good up to this point,,then take joy in the fact that
it's not going to bother u for much longer."

Kokowam

Lol. I'm just saying for future reference (syntax ones, in fact) when you need them. CA has a great variety of things on syntax.

modern algebra

I find looking at the help file more to the point, or if you know enough, even to look at the class you are trying to use. I find it atrociously annoying to sift through hundreds of syntax codes when it can be more to the point to just investigate the class you are looking at.