%character%.MaxWeight function

From ADRIFT 5 Manual Wiki
(Redirected from MaxWeight)
Jump to: navigation, search

The MaxWeight function returns the maximum total weight of all of the objects that the player can carry, as an integer.

Requirements

The "Maximum weight of held items" property of the character must be selected to be able to use this function.

You can check this using the character restriction:

[character] [must] [have property] [Maximum weight of held items]

Properties

The "Maximum weight of held items" property of the character has both a number entry field and a drop-down list containing the five weight ranges defined in the Object weight value-list property. The number returned by this function will be the number in the entry field multiplied by the value corresponding to the weight selected in the drop-down list. If [12][Heavy] is entered, then this indicates that the player is able to carry 12 heavy objects, or the equivalent weight in objects of other weights.

PropertyMaxWeight.jpg

The "Maximum weight of held items" property is defined to be of type "Integer - Object weight".

The "Object weight" object property defines the values corresponding to each of the object weights.

PropertyDialogObjectWeight.jpg

  • ADRIFT does not specify the units used for these weight values, they are completely arbitrary values.
If you wanted to print these values with units you could use grams, kg, or even pounds if your game is set in the past.
  • You can change the values in the "Object weight" value list if you need a greater or smaller range of object weights.
The default is for each named weight to have three times the weight of the next lightest.
  • ADRIFT does not have built-in support for variable gravity.

How to use

This function simply returns the value of the maximum weight the character can carry 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

  • Character7.MaxWeight
The maximum weight that the specific character with the key "Character7" can carry.
  • %Player%.MaxWeight
The maximum weight that the character being controled by the player can carry.
  • %character%.MaxWeight
The maximum weight that the referenced character in a task with a %character% reference can carry.


<<< MaxBulkCharacter FunctionsHeld >>>