test if player has an object in inventory

Started by Monsieur OUXX, Mon 06/08/2007 14:39:15

Previous topic - Next topic

Monsieur OUXX

Hello,

I'm feeling REALLY stupid about this... I've been looking for more than 20 minutes in the forum but i can't find the answer to my really really really stupid question. the answer is probably obvious but I don't know what keyword I could use for a successfull search.

I just can't remember how to test if the player has an object in his inventory or not...
 

Ashen

#1
Use the Character.InventoryQuantity property, e.g.:
Code: ags

if (player.InventoryQuantity[iKey.ID] == 0) Display("You don't have the key.");


I know this has been asked before, odd that nothing turned up in your search.

EDIT:
Actually, since it's been asked a few times now: BFAQ'd
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk