Primitive Class Flow.InventoryItem
Represents the properties of an object as it appears in the inventory.
To be used in Flow.Level.objects list.
Functions
| InventoryItem(nameKey, objectID, yOffset, scale, rot, axis, meshBits, action) | Create an InventoryItem. |
Functions
- InventoryItem(nameKey, objectID, yOffset, scale, rot, axis, meshBits, action)
-
Create an InventoryItem.
Parameters:
- nameKey string key for the item's (localised) name. Corresponds to an entry in strings.lua.
- objectID ObjID object ID of the inventory object to change
- yOffset
float
y-axis offset (positive values move the item down).
A value of about 100 will cause the item to display directly below its usual position. - scale
float
item size (1 being standard size).
A value of 0.5 will cause the item to render at half the size, and a value of 2 will cause the item to render at twice the size. - rot Rotation rotation around x, y, and z axes.
- axis
RotationAxis
Axis to rotate around when the item is observed at in the inventory.
Note that this is entirely separate from therotfield described above. Must one of the following:X Y Ze.g.
myItem.rotAxisWhenCurrent = RotationAxis.X - meshBits int Not currently implemented (will have no effect regardless of what you set it to).
- action
ItemAction
Item action or set of actions to assign. Item actions can be combined, for example:
ItemAction.USE | ItemAction.SAVE.
Returns:
-
InventoryItem
an InventoryItem.