Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Mon 05/04/2004 23:29:07

Title: money system
Post by: on Mon 05/04/2004 23:29:07
Hi i'm new to ags, and I was wondering how do u implement a money system. I have an idea of using an inventory property but I want to be sure. Also if it is an iventory property what is the best way of calling that amont when looking at the wallet in the inventory screen (is there an easy way--non scripting)?
Title: Re:money system
Post by: TerranRich on Tue 06/04/2004 03:09:52
To implement a money system, read the Beginners' FAQ (ALL BEGINNERS MUST DO THIS!!!). In order to display variables, you must use scripting, but it's easy. In the "look at inventory" interaction, click "Run Script" and enter the following:

[size=+0]Display("You have %d aluminum coins!",player.inv[47]);[/size]

Replace the number 47 with whatever inventory number the wallet is. What this does is replace the %d placeholder with the value stored in player.inv[n]. And that's all! :)