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.

Creating new data stored in $data_items?

OS

Sponsor

I need to know how (if there is a way) to add a value to all Items, Weapons, and Armours so I can tell them apart. What I mean is, I need to find out if the player selects an Item, a Weapon, or Armour.

I just thought of something...

would this work?

Code:
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end

If not, please tell me how to add properties so I can make my script without having to rewrite it. Thanks for any help, and Peace Out!

~Broken
 

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