RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RESOLVED]Window_MenuStatus Displaying a game_variable

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 87
Things we fear the most have already happened 2 us
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
« Last Edit: October 10, 2007, 03:09:59 PM by 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."

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Code: [Select]
    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)

***
Rep:
Level 87
Things we fear the most have already happened 2 us
Woohoo,,it works,,thx modern
"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."

*
A Random Custom Title
Rep:
Level 96
wah
Go check out the syntax books at CreationAsylum when you need to find stuff like that. I think they have that there.

***
Rep:
Level 87
Things we fear the most have already happened 2 us
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."

*
A Random Custom Title
Rep:
Level 96
wah
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.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
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.