TouchObjCondition class | precond.t[419]

Pre-condition: a given source object must be able to touch the object. This requires that the source object (given by our property 'sourceObj') has a clear 'touch' path to the target object.

This is a base class for arbitrary object-to-object touch conditions. In most cases, you'll want to use the more specific touchObj, which tests that the current actor can touch the current object.

`class TouchObjCondition : PreCondition`

Superclass Tree (in declaration order)

`TouchObjCondition`
`PreCondition`
`object`

Subclass Tree

(none)

Global Objects

`dobjTouchObj iobjTouchObj touchObj`

Summary of Properties

`preCondOrder sourceObj`

``

Summary of Methods

`checkPreCondition construct verifyPreCondition`

``

Properties

`preCondOrder` OVERRIDDEN | `precond.t[673]`

This condition tends to be fragile, in the sense that other preconditions for the same action have the potential to undo any implicit action that we perform to make an object touchable. This is most likely to happen when we implicitly move the actor (moving in or out of a nested room, for example) to put the actor within reach of the target object. To reduce the likelihood that this fragility will be visible to a player, try to execute this condition after other conditions. Most other preconditions tend to be "stickier" - less likely to be undone by subsequent preconditions.

`sourceObj` | `precond.t[427]`

the source object - this is the object that is attempting to touch the target object

Methods

`checkPreCondition (obj, allowImplicit)`OVERRIDDEN | `precond.t[430]`

check the condition

`construct (src)` | `precond.t[421]`

construct with a given source object

`verifyPreCondition (obj)`OVERRIDDEN | `precond.t[565]`

We've tried an implied command to remove this obstructor, but that isn't guaranteed to make the target touchable, as there could be further obstrutions, or the implied command could have failed to actually remove the obstruction. Keep iterating. To avoid looping forever in the event the implicit command we just tried isn't good enough to remove this obstruction, make a note of the obstruction we just tried to remove; if we find it again on a subsequent iteration, we'll know that we've tried before to remove it and failed, and thus we'll know to give up without making the same doomed attempt again.

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