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.
TouchObjCondition : PreCondition
Superclass Tree (in declaration order)
Summary of Properties
Summary of Methods
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.
the source object - this is the object that is attempting to touch the target object
checkPreCondition (obj, allowImplicit)OVERRIDDEN
construct with a given source object
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 5/16/2013 from TADS version 3.1.3