The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: darthatron on February 02, 2007, 01:23:00 PM

Title: Variable question...
Post by: darthatron on February 02, 2007, 01:23:00 PM
Ok, lets say I wanted Variable_1 = (number of certain item)...

how would I do that? is it even possible? because I cant work it out with events...

Thanks in advance!
Title: Re: Variable question...
Post by: modern algebra on February 02, 2007, 04:16:03 PM
Why do you need to count the items?
Title: Re: Variable question...
Post by: Blizzard on February 02, 2007, 04:19:11 PM
Use the "Call script" event command and type:

$game_variables[X] = $game_party.item_number(Y)

X is the variable ID and Y is the ID of the item. You can also check weapons and armors:

$game_variables[X] = $game_party.weapon_number(Y)

$game_variables[X] = $game_party.armor_number(Y)
Title: Re: Variable question...
Post by: darthatron on February 03, 2007, 01:55:26 AM
Thankyou very much Blizzard! I need it because you use need 5 Iron Bars to make Iron Armor, and stuff like that.