RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[REQUEST] Storing Total Items Held in a variable script

Poll

Does anyone know how to make a script where your total items held in your inventory would be stored as a variable?

Please Help
0 (0%)
Please Help
1 (16.7%)
There's no need to make this a poll.
3 (50%)
I should read the rules
2 (33.3%)

Total Members Voted: 6

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 84
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?  :)

*
Rep:
Level 87
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.
Always remember you're unique.
Just like everybody else.

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
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.

*
Rep:
Level 85
I am the wood of my broom
2010 Project of the YearProject of the Month winner for January 2010Project of the Month winner for January 2009Project of the Month winner for April 2010
Can't this be done in Variables?
Like event:
Set Variable Potions to Item>Potion>Amt. Held


*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
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.

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for December 2009Project of the Month winner for August 20082011 Best Game Creator (Non RM)Gold - GIAW Halloween
Can't this be done in Variables?
Like event:
Set Variable Potions to Item>Potion>Amt. Held
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?

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon