User Tools

Site Tools


places:memtutiv

Memories IV - How much money have I got then?

Suppose your place has got it's own internal currency. You can use a memory called Money to keep track of how much money each guest has, and the Increment Memory Contraption to change this when your guest acquires or spends money. You can even use the Memory Greater Contrivance to check that they have enough money should they try to buy something. Great! There's one thing missing though. If your guest isn't paying close attention, then they're soon going to lose track of how much money they have. You need some way of letting them know.

Maybe your guest has to guess the correct command to give to an NPC, but you're only going to allow them three guesses. You're keeping count using a memory. You want to tell them how many guesses they've used up.

You want to be able to display the number in a memory to your guest.

This functionality is built into decorating.

Once you've built your Page or Room which is going to tell them this, go to the 'Edit Memories' page of your Place (click the Programs link and it's in there). You'll see that each memory has it's own ID number. Make a note of the ID number for your Money Memory. Suppose that it's say 33.

Decorate your Page (Room) something like the follows.


Looking into your wallet you find that you have [m_33] beer vouchers left.


When this page is shown, it will look something like this.

Note for budding programmers.

The thing to notice is, of course, the “[m_33]” which gets interpreted as “the contents of Memory ID number 33”.

Obviously, the number displayed will be the contents of the memory when the page is displayed. If you have a program elsewhere that has a Show Page showing the above, and then later on (in the same program) an Increment Memory Contraption which increases your Money Memory, then the page would show the amount that the player has before the increase. The page and then the room that your guest is in are the last things to be displayed (if they're displayed at all) and so these will display the final value that is in this memory while your guest is actually reading their screen.

Note that if a guest has not interacted with a memory before then it is unset and holds no number at all. Nothing will be displayed here in this case.

Well this is all very well and good if you want to remember something that's numeric, how many times a guest has been in a particular room, but you want to remember other things. Whether a guest has solved a particular puzzle say. Have they used a particular command in the appropriate place? How do we use memories to remember these sorts of things. Read the next memories tutorial.


Proceed to the next memories tutorial.
Return to the previous memories tutorial.
Return to Places overview.

places/memtutiv.txt · Last modified: 2023/11/21 18:04 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki