Main Menu
  • Welcome to The RPG Maker Resource Kit.

Putting a maximum on the number of items

Started by Arkhan, January 24, 2007, 09:20:41 AM

0 Members and 1 Guest are viewing this topic.

Arkhan

Is there a way to limit the maximum amount of a certain item you can have?

Also, is there a way to make an item stay with you even when you have zero of it? E.g. a container of water. Whenever you get water, the number of containers increases, representing hte amount of water it holds increasing. But when you run out of water, the water container still remains there.

The first question is more important than the second.

First post, woot.

~Arkhan
Current Project ~ Avatar: The Last Airbender RPG
Just as a note, I fully understand variables and switches, so there's no need to treat me like a noob :D

Wafflekid

With the water thing, let's say you fill the bucket up at a fountain. Then you would make an event that when you click on the fountain, your items change. It would take away one emtpty bucket, but give you one full bucket. To make it seem as it's the same item when it's really too different items.

I also added a sound in that sounds like water rushing into the bucket as well as a message that says something like, "You have filled your bucket up with water"


*Sorry, I misspelled some things in my little picture, I was rushing!
Hi...

italianstal1ion

also note the MAXIMUM amount of items you can have is in the script editor:
In Game_Party  this line here
@items[item_id] = [[item_number(item_id) + n, 0].max, 99].min

Change the "99" to whatever you want. If you look further down in the editor you'll see the limits of armors and weapons too.

Taylor

To continue what italianstal1ion said- check Scene_Shop too. Otherwise you'll be able to still buy 99 of items but the overflow from the Game_Party maximum will disapear.

Hmm... this makes me think that maybe I could limit normal items to 25 while weapons only 5.