I need money. And I want the player to have a certain amount, while an event may create further money. First I looked into the documentation of money.h, but didn’t understand how to handle it. Then I created a multiple object, and it works fine but for one flaw:
take euro
Euro taken.
Euro taken.
Euro taken.
Euro taken.
Euro taken.
Everyone needs money. You should either try to understand money.h or compile the Multitudes extension into inform6 (not sure if it works). Or create a moneyobject class and have money bags or caches, and have them disappear when taken but add their money-value to player’s money-balance. (That’s what I’d do in an object-oriented language).
Sorry, but I still got no idea what to do. I can initially create me X Euro, but how do I create further money that I can pick up and thos combine with the one originally created? Greenbacks.inf doesn’t help me at all I’m afraid.
Have you looked at Chapter 29 of the DM4? It seems to address precisely the problem you’re running into.
If you’ve attempted to use the techniques in this chapter, and they aren’t giving you the results you’re hoping for, perhaps you can provide more specifics on where the snag is.
What I’ve achieved so far is to create some Euros and give them to the player. What I want to do is to create some more Euros and put them on the ground. I did so, but they’re individual objects, so “get all” results in “You take the Euro.” X times. I’d like to have the player get them all at once, like “You take the 20 Euros.”. That’s my problem. I can’t seem to find a solution for this in the manual. I assume money.h provides a solution, but I don’t understand how it works.
I’ve just done some experimenting with this. I don’t think it is possible to achieve what you want without directly hacking the library. Even then I can’t immediately think of an easy way to do it. Try to live with it for now.
Have you tried creating a big pile of indistinguishable Euros offstage at the start of the game and then moving some of them to the player and others to the room when you need them? If you do that, does Inform still end up thinking some of them are indistinguishable and some are distinguishable?