%object%.Size function

From ADRIFT 5 Manual Wiki
Jump to: navigation, search

The Size function returns an integer that indicates the relative size of the objects.

Requirements

This function can only be used with dynamic objects.

The "Object size" property of the object must be selected to be able to use this function.

You can check this using the object restriction:

[object] [must] [have property] [Object Size]

Properties

PropertyObjectSize.jpg

The "Object size" property of the object has a drop-down list containing the five size ranges defined in the Object size value-list property. The number returned by this function will be the value corresponding to the size selected in the drop-down list.

PropertyDialogObjectSize.jpg

  • All sizes are relative to the size of a "Tiny" object.
  • ADRIFT does not specify the units used for these bulk values, they are completely arbitrary values.
If you wanted to print these values with units you could use cubic centimetres, litres, or even cubic inches if your game is set in the past.
  • You can change the values in the "Object size" value list if you need a greater or smaller range of object sizes.
The default is for each size to have three times the volume of the next smallest.

How to use

This function simply returns the value of the object size property as a single integer value that can be inserted into text, or used as part of an expression in a restriction or action. No further functions can be appended to this function.

Examples

  • Object7.Size
The size of the specific object with the key "Object7".
  • %object%.Size
The size of the referenced object, in a task with an %object% reference.


<<< SurfaceHoldObject FunctionsWeight >>>