Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

How to check item ID

DolorIpsum

Villager
Xy$
0.00
Hopefully I'm posting this in the correct forum.
My problem is that I can't find a way to check item ID to put into a variable. For my item menu, I don't have a help window. Instead I want a message window to display the information about the item after it was selected, almost like with the Select Item event command. A common event would put the item ID into a variable, and then have a conditional branch that would give different messages depending on the item selected. The only option I've seen so far is to check the number of a specific item that the player has, and that is not what I'm looking for.
 

Dad3353

Praised Adventurer
@DolorIpsum ...

This code should look through all items, not just those in possession...

for (var i = 0; i < $dataItems.length; i++) {
if (!!$dataItems) {
if ($dataItems.name.length > 0) {
$gameParty.gainItem($dataItems, 99);
}
}
}


... You'd change the orange part to do whatever you want, such as get the Item ID and put it into a Variable or an Array, or check the Name etc...
Any help..?
 
Top