Help - Search - Members - Calendar
Full Version: Creating a script to do this
RPG RPG Revolution Forums > Scripting > Script Development and Support
Adrien.
THis script would have to be placed inside the script box for events, essentially I am looking to say:

if item x exists in the inventory then for the amount of item x add that number to a variable id of y

So if you have 4 feathers then variable of 15 would = 4

How would I do this?
The Law G14
CODE
$game_variables[Y] = $game_party.items[X]


I believe that would be the code, with X being the Item ID smile.gif
Adrien.
That didnt work. the item was given in battle but the variable never increased by 1 - I was given one item

its item_number(item) that I want but I cant figure out how to pass item id of 30 in.....
The Law G14
Ooh, I think I used XP code, try this instead:

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


EDiT: Just tested it, and it's working fine smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.