Qobject
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
Summary of Methods
canHear
canReach
canSee
canSmell
canTalkTo
canThrowTo
inLight
knownScopeList
reachBlocker
reachProblem
reachProblemCheck
reachProblemVerify
scentBlocker
scopeList
sightBlocker
soundBlocker
topicScopeList
Properties
dynamicSpecials
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)
Can A hear B?
canReach (a, b)
Can we reach from A to B? We return true if there’s nothing in the way, nil otherwise.
canSee (a, b)
Can A see B?
canSmell (a, b)
Can A smell B?
canTalkTo (a, b)
Determine if A can talk to B.
canThrowTo (a, b)
Determine if A can Throw something to B.
inLight (a)
Is A in the light? This determines if there’s light shining on the exterior surface of A.
knownScopeList ( )
no description available
reachBlocker (a, b)
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)
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)
no description available
reachProblemVerify (a, b)
no description available
scentBlocker (a, b)
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)
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)
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)
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 ( )
no description available
Adv3Lite Library Reference Manual
Generated on 15/03/2023 from adv3Lite version 1.6.1