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.

Limit amount of items

Vash

Member

Alright currently in the game the characters can carry unlimited amount of items (including individual item amount) I just want to put a limit n how many items the carry all together.

If you don't understand what I mean which most likly you will then here is a example:
Lets say the Item Window is a bag, the bag can only carry 5 items and 15 of each item.

Like this:
[Limit 5 Items]
Potion x15 [Limit 15]
Bread x15 [Limit 15]
Sword x15 [Limit 15]
Herb x15 [Limit 15]
Life Water X15 [Limit 15]
 
You can change the $game_player.gain_item/wweapon/armor to limit 15 items, and the various shop windows and scene to acomidate this, as for the 5 tyes max, you'll have to to a check on the sizes of the item/weapon/armor hashes.
 

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