Author Topic: Inventory maximium  (Read 3026 times)

eric22222

  • Fanatic
  • ***
  • Posts: 177
    • View Profile
    • Eric Online
    • Email
Inventory maximium
« on: 2006-06-04, 12:47:48 PM »
Is there any way to change the maximum value for an item during the course of a game? Like, being able to hold more ammo, or an RPG character getting a higher max health?

sam

  • Fanatic
  • ***
  • Posts: 303
  • This statement is false.
    • MSN Messenger - samlancashire@hotmail.com
    • View Profile
    • samlancashire.com
    • Email
Re: Inventory maximium
« Reply #1 on: 2006-06-04, 03:00:57 PM »
you could just change th inventory item to the same item but with a different max. but if there is more than one time in your game when the player could do this then it wont work out.

eric22222

  • Fanatic
  • ***
  • Posts: 177
    • View Profile
    • Eric Online
    • Email
Re: Inventory maximium
« Reply #2 on: 2006-06-04, 03:07:52 PM »
It'll be a few times during the game. Basically, we're probably going to have a single pool of energy to power all special attacks, weapons, etc. We want to have a few parts in the game where you can increase your maximum energy. I came up with a work-around that would take two extra items: empty batteries (1 gained whenever we want to increase the maximum energy) that can be changed into charged batteries at the cost of a full bar of energy. Not a whole lot more work involved, but it does seem a bit messier than our original idea...
If there's no way other than having seperate items for every new max, we'll just go with this.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Inventory maximium
« Reply #3 on: 2006-06-04, 08:10:43 PM »
That should be really easy if you're using script.
Example:
Code: [Select]
ProjectObj.GamePlayer.InvMaxQuantity(0) = 50will set the maximum quantity for the first item in the inventory to 50.