Sense class | sense.t[104]

Sense: the basic class for senses.

`class Sense : object`

Superclass Tree (in declaration order)

`Sense`
`object`

Subclass Tree

(none)

Global Objects

`sight smell sound touch`

Summary of Properties

`ambienceProp presenceProp sizeProp thruProp`

Summary of Methods

`canObjBeSensed`

Properties

`ambienceProp` | `sense.t[173]`

Each sense can define this property to specify a property pointer used to define a Thing's "ambient" energy emissions. Senses which do not use ambient energy should define this to nil.

Some senses work only on directly emitted sensory data; human hearing, for example, has no (at least effectively no) use for reflected sound, and can sense objects only by the sounds they're actually emitting. Sight, on the other hand, can make use not only of light emitted by an object but of light reflected by the object. So, sight defines an ambience property, whereas hearing, touch, and smell do not.

`presenceProp` | `sense.t[158]`

Each sense must define the property presenceProp as a property pointer giving the xxxPresence property for the sense. The xxxPresence property is the property of a Thing which determines whether or not the object has a "presence" in this sense, which is to say whether or not the object is emitting any detectable sensory data for the sense. For example, soundPresence indicates whether or not a Thing is making any noise.

The sensory presence is used to determine if an object is in scope. An object with a detectable sensory presence is normally in scope. Note that sounds and smells emitted by a tangible object are frequently represented as additional intangible objects, and in these cases the intangible object (the sensory emanation) is usually the object with a sensory presence, rather than the tangible object making the noise/odor. However, it is sometimes obvious that a particular sound or odor is coming from a particular kind of object, so the presence of the sound or odor implies the presence of the source object and thus places the source object in scope. In such cases, it is desirable for the source object to have a sensory presence of its own, in addition to the sensory presence of the intangible sensory emanation object.

Note that the "presence" doesn't have any effect on whether or not an object can be sensed. Only the sense path matters for that: an object without a presence can still be sensed if there's a non-opaque sense path to the object. Presence only determines whether or not an object is *actively* calling attention to itself.

`sizeProp` | `sense.t[125]`

Each sense must define the property sizeProp as a property pointer giving the xxxSize property for the sense. The xxxSize property is the property of a Thing which determines how "large" the object is with respect to the sense. For example, sightSize indicates how large the object is visually, while soundSize indicates how loud the object is.

The purpose of an object's size in a given sense is to determine how well the object can be sensed through an obscuring medium or at a distance.

`thruProp` | `sense.t[111]`

Each sense must define the property thruProp as a property pointer giving the xxxThru property for the sense. The xxxThru property is the property of a material which determines how the sense passes through that material.

Methods

`canObjBeSensed (obj, trans, ambient)` | `sense.t[188]`

Determine if, in general, the given object can be sensed under the given conditions. Returns true if so, nil if not. By default, if the ambient level is zero, we'll return nil; otherwise, if the transparency level is 'transparent', we'll return true; otherwise, we'll consult the object's size:

- Small objects cannot be sensed under less than transparent conditions.

- Medium or large objects can be sensed in any conditions other than opaque.

TADS 3 Library Manual
Generated on 8/21/2012 from TADS version 3.1.2