Home Reference Expression functions 

dopoption expression function

Returns the value of a DOP field as a float.

Usage

dopoption(dop, objectSpec, subDataName, fieldName)

If a field is multivalued, you can access individual parameters by adding a suffix.

For example, “positiony” will access the y component of the “position” field. If the field is a quaternion, one can use “rx”, “ry”, and “rz” as extensions to get the euler rotations for the quaternion.

This function is exactly the same as the dopfield function except the fourth and fifth arguments are always “Options” and “0” respectively.

Examples

dopoption("/obj/dopnet1", "obj0", "Position", "ty")

Returns the y position of object obj0

dopoption("/obj/dopnet1", "obj0", "Position", "ry")

Returns the ry component of the orientation of object obj0. This will be in degrees.