Module for controlling all moveables behavior.
trx.items.ItemRepresents an item, also known as a moveable.
Properties:
pos: A table with fields x, y, z representing position.rot: A table with fields x, y, z representing rotation.anim: Current animation number (0-indexed).frame: Current frame number (0-indexed).room_num: room number.room: [trx.rooms.Room] object for the room containing this item.status: Integer representing the item's status.hit_points: Integer representing the item's hit points.max_hit_points: Integer representing the item's hit points.object_id: Integer ID of the item's object type.name: String name of the item, or nil if none.Writable properties:
pos (updating this also updates room and room_num)rotanimframehit_points (updating this also may increase max_hit_points)max_hit_pointsname (string identifier; setting duplicates raises an error)#trx.itemstrx.items[num]trx.items["name"]trx.items.Itemname, or nil if out of range/not found.
Example:
local item = trx.items[1]
item.name = "lara"
local lara = trx.items["lara"]
trx.items.fn.get(arg)trx.items[arg].
Example:
local item_hp = trx.items.fn.get(17).hit_points
local lara_hp = trx.items.fn.get("lara").hit_points