Inform.t
Version
3.2
This
file is part of the Inform.t Author’s Manual
Copyright
© 1999 by Kevin Forchione. All rights reserved.
Inform-style Room Display
Inform.t version 3.2 incorporates
inform-style room display. By #defining USE_INFORM_DISPLAY in your game source
you can take advantage of the following object properties:
·
initial
·
describe
·
whenOpen & whenClosed
·
whenOn & whenOff
Additionally, inform.t will alter
the normal room display to reflect the following order:
·
room.initial
·
room.nrmLkAround
o
room.ldesc
o
room.contents_fixeditems.heredesc
o
room.contents_containers.whenOpen & whenClosed
o
room.contents_switchItems.whenOn & whenOff
o
room.contents_doorway.whenOpen & whenClosed
o
room.contents_actors.actorDesc
o
room.contents.initial
o
room.contents.describe
o
remaining room.contents
·
room.firstseen
Why Use Inform-style Room Descriptions?
The
initial, describe, whenOpen, whenClosed, whenOn, and whenOff are useful to
create certain effects in a game display. For instance:
Wonderful World of
Containers
This is Room 11, east of the foyer. You notice a typical piece
of scenery which turns out to be a surface: a mantelpiece.
A bearded psychiatrist has you under observation.
A portable television set has two sub-objects attached: a power
button and a screen.
A pretty typical shut cupboard is bolted to one wall.
A macrame hangs from the ceiling, shut tight. Inside you can
make out a music box.
You can also see a green ball, a red cone, a blue pyramid, a
plain shopping bag (which can only hold 2 things), and a glass box with a lid,
a steel box with a lid, a toothed bag, and a bolted key here.
Ordinarily
TADS would display the room.sdesc, followed by the room.ldesc, actor.actorDesc,
and then a listing of the room contents. The above display demonstrates the use
of initial and describe to separate out certain objects from the room contents
as being of special note, and provides more information than would normally be
available with obj.sdesc.
initial
String or method
For
objects: The description of an object not yet picked up, used when a room is
described.
For
rooms: Called when the room is arrived in. Displays before room.sdesc.
Warning:
If the object is a doorway, or a container, or is switchItem, then use one of
the when-properties rather than initial.
No
return value expected from method.
describe String
or method
For
objects: Called when the object is to be described in a room description,
regardless of whether the object has been moved or not.
For
rooms: not yet incorporated.
No
return value expected from method.
whenOpen String
or method
For
objects: Called when the container or doorway is open.
No
return value expected from method.
whenClosed: String
or method
For
objects: Called when the container or doorway is closed.
No
return value expected from method.
whenOn: String
or method
For
objects: Called when the switchItem is active.
No
return value expected from method.
whenOff: String
or method
For
objects: Called when the switchItem is not active.
No
return value expected from method.