The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Malcolm1234 on March 11, 2009, 02:12:35 AM

Poll
Question: Does anyone know how to make a script where your total items held in your inventory would be stored as a variable?
Option 1: Please Help votes: 0
Option 2: Please Help votes: 1
Option 3: There's no need to make this a poll. votes: 3
Option 4: I should read the rules votes: 2
Title: [REQUEST] Storing Total Items Held in a variable script
Post by: Malcolm1234 on March 11, 2009, 02:12:35 AM
I looked around several other threads, tried it myself, but I just cant get it right, I'm semi-new to scripting. Could anyone please help me?  :)
Title: Re: Storing Total Items Held in a variable script
Post by: shaz on March 11, 2009, 06:30:41 AM
The Control Variables event command will let you store the quantity of a certain item into a variable.

The equivalent in a script is $game_party.item_number[1] where 1 is the item number listed in the database.

Is this what you want?  I'm not sure I'm interpreting your request correctly.
Title: Re: Storing Total Items Held in a variable script
Post by: Falcon on March 11, 2009, 10:41:45 AM
http://rmrk.net/index.php/topic,20694.0.html
Strike 1, next time read the rules.

This sounds like a request, so I'm moving it.
Title: Re: [REQUEST] Storing Total Items Held in a variable script
Post by: Nessiah on March 11, 2009, 10:49:30 AM
Can't this be done in Variables?
Like event:
Set Variable Potions to Item>Potion>Amt. Held
Title: Re: [REQUEST] Storing Total Items Held in a variable script
Post by: modern algebra on March 11, 2009, 01:07:56 PM
I think he wants to add up all items. So, if he has 2 potions and 2 High Potions, he wants it to return 4.

In any case, it can be done simply by doing what you say and adding all other items.
Title: Re: [REQUEST] Storing Total Items Held in a variable script
Post by: tSwitch on March 11, 2009, 04:12:33 PM
Quote from: Nessiah on March 11, 2009, 10:49:30 AM
Can't this be done in Variables?
Like event:
Set Variable Potions to Item>Potion>Amt. Held
Quote from: Modern Algebra on March 11, 2009, 01:07:56 PM
I think he wants to add up all items. So, if he has 2 potions and 2 High Potions, he wants it to return 4.

In any case, it can be done simply by doing what you say and adding all other items.

problem solved?
further questions?