money system

Started by , Mon 05/04/2004 23:29:07

Previous topic - Next topic

PUnker 44

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)?

TerranRich

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! :)
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk