Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: tiagocorreia on Fri 28/04/2006 16:56:32

Title: Find what objects a player has
Post by: tiagocorreia on Fri 28/04/2006 16:56:32
I've read the manual looking for a solution, but i didn't.

I would like to know if it is possible to know what inventory objects a character carry.
I don't find any property or function to do it.

I know I can do it programming, but I tought it, might be an easier way.
Title: Re: Find what objects a player has
Post by: strazer on Fri 28/04/2006 17:13:19
There is the Character.InventoryQuantity property you can use to check if a character has a specific inventory item:


  if (cGeorge.InventoryQuantity[iBall.ID] > 0) {
    Display("George has the ball.");
  }


If you tell us what you want to do exactly, we might be able to help you further.
Title: Re: Find what objects a player has
Post by: tiagocorreia on Fri 28/04/2006 18:47:29
Thank you. That was just what I needed.

I thought the InventoryQuantity would say, how many objects in the inventory the character has.

I didn't read the manula correctly. Thanks.