Object
Operations on objects, variables, and kinds.
Select a named field from a record, or a named property from an object.
The name of the field to read or write.
The field must exist in the object or record being accessed.
Select a value from a list of values.
The one-based index to read or write.
The index must exist within the list being targeted.
Change to the previous state in some particular set of states for a given object ( or record. )
Optionally, returns the new value of the state.
Uses the order of the states where as they were originally defined.
See [DefineState].
The object or record in question.
The name of the set of states in question.
See also [DefineState].
Customize the size of the decrement. When not specified, decrease by a single step.
Customize the behavior of decrement when the first state has been reached. If clamp if false ( or not specified ), decrement will wrap around to the last state. When clamp is true, decrement will stick to the first state.
A list of the fields of a given kind.
The kind in question.
Change to the next state in some particular set of states for a given object ( or record. )
Optionally, returns the new value of the state.
Uses the order of the states where as they were originally defined.
See [DefineState].
The object or record in question.
The name of the set of states in question.
See also [DefineState].
Customize the size of the increment. When not specified, increase by a single step.
Customize the behavior of increment when the last state has been reached. If clamp if false ( or not specified ), increment will wrap around to the first state. When clamp is true, increment will stick to the last state.
Determine whether an object (or record) is compatible with the named kind.
For example, all containers are a kind of prop.
Asking if a container is a kind of a prop would return true.
See also [IsExactKindOf].
Determine whether an object (or record) is of exactly the named kind.
For example, all containers are a kind of prop.
Asking if a container is exactly a prop would return false.
See also [IsKindOf].
The kind of an object or record.
Read a value from an object. As a special case, if there are no dot parts, this will return the id of the object.
In .tell files, this command is often specified with a shortcut. For example:
is a shorter way to say:
WARNING: This doesn't convert values from one type to another. For instance, if a field was declared as text, this will error if read as a boolean.
The full name of an object as originally specified by the author.
Generates an error for unknown objects except
it returns empty text when given empty text.
See also [ObjectDot] which can return the object's unique id.
The object in question.
( Records don't have names. )
All of an object's current states as a list of text.
( Despite the name, can also be used on records. )
The object or record in question.
A list of all objects accessible by the current scene that compatible with the specified kind.
The kind in question.
Set the state of an object or record.
See also: story `Define state:names:`.
Store a value into a variable or object.
Values are specified as a generic [Assignment].
The various "From" commands exist to cast specific value types into an assignment.
WARNING: This doesn't convert values from one type to another.
For example:
will only work if the local variable can store text. If the variable was declared as a number, the command will generate an error.
Object property or variable into which to write the value.
The value to copy into the destination.
Read a value from a variable.
In .tell files, this command is often specified with a shortcut. For example:
is a shorter way to say:
WARNING: This doesn't convert values from one type to another. For instance, if a field was declared as text, this will error if read as a boolean.
Exact name of the variable in question.
The field or path within the variable to read from.
Specifying a dot only makes sense when the variable contains
a record, a list, or the id an object.
When this isn't specified, the command returns the value of the variable itself.
Definitions:
Slots:
Commands:
Commands
Slots:
Terms:
field:
TextEval
Slots:
Terms:
index:
NumEval
Slots:
Terms:
Decrease:
Address
state:
TextEval
by:
optional
NumEval
clamp:
optional
BoolEval
Slots:
Terms:
of:
TextEval
Slots:
Terms:
Increase:
Address
state:
TextEval
by:
optional
NumEval
clamp:
optional
BoolEval
Slots:
Terms:
Slots:
Terms:
Slots:
Terms:
"#my_object.some_field"
Object:dot:
- "my object"
- "some field"
Slots:
Terms:
Slots:
Terms:
name:
Address
Slots:
Terms:
states:
Address
Slots:
Terms:
of:
TextEval
Slots:
Terms:
Set:value:
- "@some_local_variable"
- FromText: "a piece of text to store."
Slots:
Terms:
Set:
Address
value:
Assignment
"@some_local_variable"
Variable:dot: "some local variable"
Slots:
Terms:
Variable:
TextEval
dot:
optional
Dot
repeats