Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: DCillusion on Sun 02/11/2003 04:31:23

Title: multiple number of items
Post by: DCillusion on Sun 02/11/2003 04:31:23
I saw it when I started, but now I can't find it.

How do give and take multiples of the same item.

EX:  Coin x 7

(7 coins in inv.)
Title: Re:multiple number of items
Post by: RickJ on Sun 02/11/2003 05:48:15
The character's global inventory variables are integers and can be used to keep track of how many items the character has.  So if the coins were inventory item 1 then you would do
something like the following to use 7 coins.

character[EGO].inv[1] = character[EGO].inv[1]  - 7;