MikeDesert wrote:I notice there's a section called "How to make a lamp that runs out of batteries". it's just a place holder without any directions.I beg of you not to fill it in. I never ever want to play another text adventure where my lamp runs out of batteries. Thank you!

MikeDesert wrote:I notice there's a section called "How to make a lamp that runs out of batteries". it's just a place holder without any directions.I beg of you not to fill it in. I never ever want to play another text adventure where my lamp runs out of batteries. Thank you!

lol. out loud. in public.

Should I add "How to make a maze"?

haha...the reason I never ever finished Colossal Cave Adventure or Madness and the Minotaur (my avatar)

Kennedy wrote:How does the PropertyValue function work? Or more precisely what values are acceptable for propertykey?

The easiest way to see is to drag a property onto a textbox. It will then auto-populate the property key. You can see what the keys are on all items by selecting Settings > General > Show Keys on Edit forms.

You'll need two lamp objects (one for the dark lamp and one for the lit one).

The dark lamp should have two properties: "Battery_Life" (number) and "Is_on" (selection)Battery_life should have a positive initial value. Is_on should be false. The dark lamp should be somewhere the player can find it and the lit one should be out of play.

Have an event that starts immediately, lasts one turn, restarts immediately on finish, and runs task "# Decrement Battery" on completion.

System task "# Decrement Battery".It has one condition (Dark lamp has property is_on true).It has two actions: 1) Decrease Battery_Life of dark_lamp by one.2) Run task "# Check for exhausted lamp"

System task "# Check for exhausted lamp" has one condition (Battery_life of dark_lamp must be <= 0)Actions are:1) Run task "# Announce lamp going out"2) Set Is_on of dark_lamp to false3) Exchange locations of lit_lamp and dark_lamp.4) Set Battery_life of dark_lamp to 0. (Sanity check)

System task "# Announce lamp going out" has one condition (lit_lamp must be visible to player)It should print appropriate text.

Optionally, add some system task like "# Announce low battery of xx", with two conditions (lit lamp visible to player and battery_life of dark_lamp == xx), that print appropriate text; have task "# Decrement battery" call them as well.

While I don't recommend the specific example of a lamp whose batteries run out, knowing how to manually implement timers is useful.

Bloodhounds can make you laugh and cuss in the same breath. They are endearing, faithful, and can sling drool ten feet in any direction. -- Virginia Lanier

If anyone has any contributions they would like to have added to the Wiki, but do not know how or would rather have someone else add it, please send it to me via pm.

If you are a person who knows how to use the Wiki and are willing to submit things for users who don't know how, please add something in your signature so people will know they can send their WIki submissions to you as well.

If you have a submission, please remember that it is for general public use and should be written as 'informational'. Please specifically specify credit information, otherwise it will be omitted.

You can contact Campbell or another administrator to discuss the block. You cannot use the 'e-mail this user' feature unless a valid e-mail address is specified in your account preferences and you have not been blocked from using it. Your current IP address is 189.51.216.63, and the block ID is #10. Please include all above details in any queries you make.