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_Help Flaw/Bug!

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 88
Menu & Battle System Guru
I'm modifying Window_Help and realized a problem that the system doesn't refresh the enemy name for the enemy selection. What I mean is that when you select the first enemy in a troop it'll display say "Ghost" but (if you have a troop with more than one type of enemy) when you move the enemy cursor/selection to the second enemy say "Angel", the window will still say "Ghost." Mind you, that this has nothing to do with anything i've modified...it's just a flaw or bug, if you will, in the system.

How this affects me (besides the small fact that I'm a perfectionist and can't stand to have such an error in my game) is that I am modifying the window to display the enemy's HP & SP. So the problem lies in that when a player selects a different enemy, other than the first one, it will display the first enemy's (again the "Ghost's") HP & SP even though the cursor is currently on the second enemy ("Angel").

Any ideas on how to fix this?...b/c it's driving me insane!

here's the script:

Code: [Select]
#==============================================================================
# ** Window_Help
#------------------------------------------------------------------------------
#  This window shows skill and item explanations along with actor status.
#==============================================================================

class Window_Help < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 640, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
  end
  #--------------------------------------------------------------------------
  # * Set Text
  #  text  : text string displayed in window
  #  align : alignment (0..flush left, 1..center, 2..flush right)
  #--------------------------------------------------------------------------
  def set_text(text, align = 0)
    # If at least one part of text and alignment differ from last time
    if text != @text or align != @align
      # Redraw text
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
      @text = text
      @align = align
      @actor = nil
    end
    self.visible = true
  end
  #--------------------------------------------------------------------------
  # * Set Actor
  #     actor : status displaying actor
  #--------------------------------------------------------------------------
  def set_actor(actor)
    if actor != @actor
      self.contents.clear
      draw_actor_name(actor, 4, 0)
      draw_actor_state(actor, 140, 0)
      draw_actor_hp(actor, 284, 0)
      draw_actor_sp(actor, 460, 0)
      @actor = actor
      @text = nil
      self.visible = true
    end
  end
  #--------------------------------------------------------------------------
  # * Set Enemy
  #     enemy : name and status displaying enemy
  #--------------------------------------------------------------------------
  def set_enemy(enemy)
    text = enemy.name
    state_text = make_battler_state_text(enemy, 112, false)
    if state_text != ""
      text += "  " + state_text
    end
    set_text(text, 1)
  end
end
« Last Edit: March 07, 2007, 06:43:50 AM by blazinhandle »

***
Rep:
Level 88
Smarter than the average bear
huh, mine refreshes when you have your cursor move from monster to monster..
besides the window doesn't refresh there, somewhere in scene_battle it will say something like Window_help set text = "(monster name)"

Couldnt help you with displaying HP/SP, shouldnt be too hard though...

***
Rep:
Level 88
Menu & Battle System Guru
yeah sorry lol. i solved it : ) sorry i tend to jump ahead and ask before trying it extensively myself.  ::)