Instead of giving money to Sam:
say “Sam eagerly accepts the money.[line break]
[’]Great![’] he says. [’]Now we can pay the rent and get this thing on wax![’]”;
now the dollars of the wallet is 0;
continue the action.[/code]
Again, if you just say “Money is a thing” it’s created off-stage. The money has to be somewhere in the room with the player (or where the player can see it) for that to work.
So the first thing you should do is make sure that the money is where you want it to be. A useful debug command here is to type “showme the money” (no really) just before “give money to sam,” which will give you a rundown of the money and all its qualities including its location.
If the money is in the wallet that’s carried by the player then you need to check whether the player can see the money. One possibility is that the wallet is an opaque closed container, in which case the player won’t be able to see what’s inside it. If that’s so you might want to make the wallet an open container. (The visibility rules are quite a bit more complicated than just “the player can see what’s in the same room”–I was cheating a bit there, sorry.)
take money from wallet
You can’t see any such thing.
i
You are carrying:
a screw
a leather case (closed)
a screwdriver
a wallet (with $50 in it)
an ID
a Jacket (being worn)
Shoes (being worn)
Socks (being worn)
Pants (being worn)
a Shirt (being worn)
Great balls of fire! Jerry Lee Lunk just walked out of the Kit Kat Club!
There’s a whole lot of movin’ goin’ on. Be a part of it.
showme money
money - thing
location: carried by Ollie in Kit Kat Club
singular-named, proper-named; unlit, inedible, portable
list grouping key: none
printed name: “money”
printed plural name: none
indefinite article: none
description: none
initial appearance: none
As you can see, I7 tells me that player and Ollie have the money.
Understand rules only affect what the player can type, not how the code recognizes things. You’ll need to point your rule at the variable attached to the wallet, using it’s actual name.