Boolean functions

From ADRIFT 5 Manual Wiki
Jump to: navigation, search

The boolean item functions correspond to selection-only properties.

They can be used in three ways:

  • If used to read a property value, the function will return 0 if the property is not selected and 1 if it is selected.
  • If used with a group then the function will filter the group so that only those members which have that property selected will remain.
  • In an expression you can test their value in an IF function.

Common object properties

These properties are shared by both static and dynamic objects:

Surface

If the "Object is a supporter" property of an object is selected, then this object is a flat surface such as a table, chair or bed, on top of which other objects may be placed.

The "%object%.Surface" function will return 1 if this property is set, or 0 if it's not.

Used with an object group this function will filter the group to only contain objects with surfaces that can support other objects.

Selecting this property will also make four other properties available:

ObjectPropertiesCanHold.jpg

The first 3 are selection-only properties which determine whether a character (including the player) are able to lay down on, sit on or stand on this object.

The "...and the surface can hold" property indicates the number of objects that can be placed on this surface. This value can be read with the %object%.SurfaceHold function

Lieable

%object%.Lieable returns the value 1 if the "Characters can lie on this object" property is selected, 0 otherwise.

ObjectGroup.Lieable filters an object group to only return the group members which have this property selected.

This property must be selected for the player to be able to lie down on this object.

Sittable

%object%.Sittable returns the value 1 if the "Characters can sit on this object" property is selected, 0 otherwise.

ObjectGroup.Sittable filters an object group to only return the group members which have this property selected.

This property must be selected for the player to be able to sit down on this object.

Standable

%object%.Sittable returns the value 1 if the "Characters can stand on this object" property is selected, 0 otherwise.

ObjectGroup.Sittable filters an object group to only return the group members which have this property selected.

This property must be selected for the player to be able to stand on top of this object.

Container

%object%.Container returns the value 1 if the "Object is a container" property is selected, 0 otherwise.

ObjectGroup.Container filters an object group to only return the group members which have this property selected.

This property must be selected for other objects to be able to be placed inside of this object.

If this property is selected then 2 other properties become available:

PropertyContainerCapacity.jpg

CharactersCanGoInOb

%object%.CharactersCanGoInOb returns the value 1 if the "Characters can go inside this object" property is selected, 0 otherwise.

ObjectGroup.CharactersCanGoInOb filters an object group to only return the group members which have this property selected.

This property must be selected for the player to be able to go inside of this object.

Openable

%object%.Openable returns the value 1 if the "Object can be opened and closed" property is selected, 0 otherwise.

ObjectGroup.Openable filters an object group to only return the group members which have this property selected.

This property must be selected for any object that has a door, lid, drawer, zipper or any other way of closing it that prevents access to its contents. It is also selected for doors and gates that block access between two locations.

Selecting this property makes the "Open status" and "Object can be locked" properties available for that object.

PropertyObjectLockable.jpg

Lockable

%object%.Lockable returns the value 1 if the "Object can be locked" property is selected, 0 otherwise.

ObjectGroup.Lockable filters an object group to only return the group members which have this property selected.

This property is selected for an openable object to make it lockable with a single specific key object.

Selecting this property makes the "Key for lock" property available for that object. An object MUST be chosen to act as the key for this lock.

Readable

%object%.Readable returns the value 1 if the "Object is readable" property is selected, 0 otherwise.

ObjectGroup.Readable filters an object group to only return the group members which have this property selected.

This property must be selected for the player to be able to use the command "read %object%" with it.

Static object properties

Objects which are too big or heavy to pick up and move around will have these properties:

ExplicitlyList

%object%.ExplicitlyList returns the value 1 if the "Specifically list object in location descriptions" property is selected, 0 otherwise.

ObjectGroup.ExplicitlyList filters an object group to only return the group members which have this property selected.

When this property is selected, then the "When object is listed in location, display this" property becomes available:

PropertyListDescription.jpg

The text in this text box can be accessed using the %object%.ListDescription function.

Static objects are not normally listed automatically, as it is expected that they will be described in the location description. By selecting this property you will cause it to be listed after the location description just like a dynamic object would be.

Dynamic object properties

Objects that the player can pick up will have these properties:

Drinkable

%object%.Drinkable returns the value 1 if the "Object is drinkable" property is selected, 0 otherwise.

ObjectGroup.Drinkable filters an object group to only return the group members which have this property selected.

This property must be selected for the player to be able to use the command "drink %object%" with it.

Edible

%object%.Edible returns the value 1 if the "Object is edible" property is selected, 0 otherwise.

ObjectGroup.Edible filters an object group to only return the group members which have this property selected.

This property must be selected for the player to be able to use the "eat %object%" command with it.

Wearable

%object%.Edible returns the value 1 if the "Object is wearable" property is selected, 0 otherwise.

ObjectGroup.Edible filters an object group to only return the group members which have this property selected.

This property must be selected for the player to be able to use this object as an item of clothing.

ExplicitlyExclude

%object%.ExplicitlyExclude returns the value 1 if the "Specifically exclude object from location descriptions" property is selected, 0 otherwise.

ObjectGroup.ExplicitlyExclude filters an object group to only return the group members which have this property selected.

When this property is NOT selected, then the "When object is listed in location, display this" property is available. Selecting this property removes it from the property page:

PropertyListDescriptionDynamic.jpg

Dynamic objects are usually listed along with the description of the location in which they are located, either printing the contents of the "When object is listed in location, display this" property or listing it by name. Selecting this property hides the object, so the player will not know it is there unless it is mentioned in the location description (using Alternate Descriptions so it is not mentioned when it is not there).

Character properties

Known

%character%.Known returns the value 1 if the "Is this character known to the player" property is selected, 0 otherwise.

CharacterGroup.Known filters a character group to only return the group members whose proper names are known to the player.

This property determines if the player is shown the proper name of the character or its descriptor, by the %character%.Name function.

MaxBulk

%character%.MaxBulk returns the value 1 if the "Maximum size of held items" property is selected, 0 otherwise.

CharacterGroup.MaxBulk filters a character group to only return the group members that have a limit on the total size of objects that they are able to carry.

MaxWeight

%character%.MaxWeight returns the value 1 if the "Maximum weight of held items" property is selected, 0 otherwise.

CharacterGroup.MaxWeight filters a character group to only return the group members that have a limit on the total weight of objects that they are able to carry.

ShowEnterExit

%character%.ShowEnterExit Returns the value 1 if the "Show character entering/exiting the location" property is selected, 0 otherwise.

CharacterGroup.ShowEnterExit filters a character group to only return the group members that will generate a message whenever they enter or leave the same location as the player character.

When this property is selected, two additional properties become available. Description when enters the location and Description when exits the location

PropertyCharacterEnterExit.jpg

Examples

  • Object7.Surface
Returns 1 if the specific object with the key "Object7" can have other objects placed on top of it, 0 if not.
  • %object%.Openable
Returns 1 if the referenced object, in a task with an %object% reference, can be opened and closed by the player.
  • LightSources.Container.List
Filters the list of objects in the object group "Light Sources" so that only those that are containers (that have the "Object is a container" property selected) are listed.


<<< List of Item functionsObject FunctionsGeneral Functions >>>