Qobject | query.t[40]

Q is the general-purpose global Query object. Its various methods are used to ask questions about the game state.

For any query, there are two sources of answers. First, there's the standard answer based on the basic "physics" of the adventure world model. Second, there are any number of custom answers from Special objects, which define customizations that apply to specific combinations of actors, locations, objects, times, or just about anything else that the game can model.

The standard physics-based answer is the default. It provides the answer if there are no active Special objects that provide custom answers.

If there are active Specials, the only ones that matter for a particular query are the ones that define that query's method. If there are any active Special objects that define a query method, calling Q.foo() actually calls the highest-priority Special's version of the foo() method. That Special method can in turn call the next lower priority Special using next(). If there are no active Special objects defining a query method, the default handler in QDefaults will be used automatically.

`Q : object`

Superclass Tree (in declaration order)

`Q`
`object`

Summary of Properties

`dynamicSpecials`

Summary of Methods

`canHear canReach canSee canSmell canTalkTo canThrowTo inLight knownScopeList reachBlocker reachProblem reachProblemCheck reachProblemVerify scentBlocker scopeList sightBlocker soundBlocker topicScopeList`

Properties

`dynamicSpecials` | `query.t[159]`

Are the active conditions on Specials dynamic (i.e. such as to change during the course of the game)? By default we'll assume that some of them may be.

Methods

`canHear (a, b)` | `query.t[115]`

Can A hear B?

`canReach (a, b)` | `query.t[84]`

Can we reach from A to B? We return true if there's nothing in the way, nil otherwise.

`canSee (a, b)` | `query.t[66]`

Can A see B?

`canSmell (a, b)` | `query.t[131]`

Can A smell B?

`canTalkTo (a, b)` | `query.t[147]`

Determine if A can talk to B.

`canThrowTo (a, b)` | `query.t[151]`

Determine if A can Throw something to B.

`inLight (a)` | `query.t[60]`

Is A in the light? This determines if there's light shining on the exterior surface of A.

`knownScopeList ( )` | `query.t[50]`

no description available

`reachBlocker (a, b)` | `query.t[94]`

Determine if A can reach B, and if not, what stands in the way. Returns a list of containers along the path between A and B that obstruct the reach. If the two objects are in separate rooms, the top-level room containing A is in the list to represent the room separation. If there's no obstruction, we return an empty list.

`reachProblem (a, b)` | `query.t[103]`

Determine if there is a problem with A reaching B, and if so what it is. If there is a problem return a ReachProblem object describing what the problem is, otherwise return nil.

`reachProblemCheck (a, b)` | `query.t[109]`

no description available

`reachProblemVerify (a, b)` | `query.t[106]`

no description available

`scentBlocker (a, b)` | `query.t[141]`

Determine if A can smell B, and if not, what stands in the way. Returns a list of obstructions to scent between A and B. If the two objects are in separate rooms, the outermost room containing A represents the room separation. If there are no obstructions, returns an empty list.

`scopeList (actor)` | `query.t[46]`

Get the list of objects that are in scope for the given actor. Returns a ScopeList object containing the scope. You can convert the ScopeList to an ordinary list of objects via toList().

`sightBlocker (a, b)` | `query.t[77]`

Determine if there's anything blocking the sight path from A to B. Returns a list of objects blocking sight; if there's no obstruction, returns an empty list. If the two objects are in separate rooms, the outermost room containing 'a' represents the room separation. If there's no obstruction, returns an empty list.

`soundBlocker (a, b)` | `query.t[125]`

Determine if A can hear B, and if not, what stands in the way. We return a list of the obstructions to sound between A and B. If the two objects are in separate rooms, the top level room containing A represents the room separation. If there are no sound obstructions, returns an empty list.

`topicScopeList ( )` | `query.t[53]`

no description available

Adv3Lite Library Reference Manual
Generated on 01/03/2024 from adv3Lite version 1.6.2