Moneyxxx

I did read chapter 9.4 of the documentation but it didn’t help me. I want to have a currency called “gilgoms”, and the player may have 1-∞ gilgoms in his inventory. Works so far, I defined an object “MyMoney” and print the amount of gilgoms owned via “printed name”. And of course I fail when it comes to “give 5 gilgoms to NPC”. What do I have to do to implement a “proper” currency of which I can GIVE an amount away? Surrounding this by forcing the player to BUY something seems inappropriate to me. Thanks!

A few tries later I can reduce my problem to “How to use “give” with multiple objects?”, the multiple objects being 5 gilgoms.

If money can exist in large sums, you should treat it as an integer and define something like

Paying it to is an action applying to one number and one thing.
2 Likes

Yeah, Inform’s multiple-object implementation can be pretty fussy and high-maintenance, so I’d definitely use this approach over implementing each gilgom as its own object.