BaseMultiLocclass | objects.t[2436] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
We provide four ways of initializing a multi-located object's set of locations.
First, the object can simply enumerate the locations explicitly, by setting the 'locationList' property to the list of locations.
Second, the object can indicate that it's located in every object of a given class, by setting the 'initialLocationClass' property to the desired class.
Third, the object can define a rule that specifies which objects are its initial locations, by defining the 'isInitiallyIn(obj)' method to return true if 'obj' is an initial location, nil if not. This can be combined with the 'initialLocationClass' mechanism: if 'initialLocationClass' is non-nil, then only objects of the given class will be tested with 'isInitiallyIn()'; if 'initialLocationClass' is nil, then every object in the entire game will be tested.
Fourth, you can override the method buildLocationList() to build an return the initial list of locations. You can use this approach if you have a complex set of rules for determining the initial location list, and none of the above approaches are flexible enough to implement it. If you override buildLocationList(), simply compute and return the list of initial locations; the library will automatically call the method during pre-initialization.
If you don't define any of these, then the object simply has no initial locations by default.
class
BaseMultiLoc : object
BaseMultiLoc
MultiInstance
MultiFaceted
MultiLoc
SenseConnector
DistanceConnector
initialLocationClass
locationList
buildLocationList
isDirectlyIn
isIn
isInitiallyIn
isListedInContents
isOrIsIn
initialLocationClass | objects.t[2451] |
locationList | objects.t[2443] |
buildLocationList ( ) | objects.t[2471] |
isDirectlyIn (obj) | objects.t[2533] |
isIn (obj) | objects.t[2518] |
isInitiallyIn (obj) | objects.t[2460] |
isListedInContents (examinee, :?) | objects.t[2551] |
isOrIsIn (obj) | objects.t[2559] |