Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Help changing one line to show Weapon name instead of Class name

Status
Not open for further replies.
I'm using the FFXII CMS and I want it to show the Currently equipped Weapon instead of the Class of the hero.

Code:
  def draw_actor_class2(actor, x, y)
    self.contents.font.name = "Black Chancery"
    self.contents.font.color = outline_color
    self.contents.draw_text(x + 1, y + 1, 236, 32, actor.class_name)
    self.contents.draw_text(x + 1, y - 1, 236, 32, actor.class_name)
    self.contents.draw_text(x - 1, y + 1, 236, 32, actor.class_name)
    self.contents.draw_text(x - 1, y - 1, 236, 32, actor.class_name)
    self.contents.font.color = Color.new(238, 139, 254, 255)
    self.contents.draw_text(x, y, 236, 32, actor.class_name)
    end

Can someone change that bit of code in there to show the Weapon name?
Thanks.
 
Replace the method with this one:
Code:
def draw_actor_class2(actor, x, y)
    self.contents.font.name = "Black Chancery"
    self.contents.font.color = outline_color
    self.contents.draw_text(x + 1, y + 1, 236, 32, $data_weapons[actor.weapon_id].name)
    self.contents.draw_text(x + 1, y - 1, 236, 32, $data_weapons[actor.weapon_id].name)
    self.contents.draw_text(x - 1, y + 1, 236, 32, $data_weapons[actor.weapon_id].name)
    self.contents.draw_text(x - 1, y - 1, 236, 32, $data_weapons[actor.weapon_id].name)
    self.contents.font.color = Color.new(238, 139, 254, 255)
    self.contents.draw_text(x, y, 236, 32, $data_weapons[actor.weapon_id].name)
    end
 
This topic has been resolved. If Lord_Vaati or any other users have any questions or further problems regarding this topic, please create a new thread about them.

Thank you!
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top