Skip to content

CreateCarryItem

Lays a carry item in the world - a sack, a basket, a bucket to be picked up and carried.

item is an item of the game - its name ("waterBucket"), id or class GUID; the ones made to be carried look right (see the group’s description). The item lies at x, y, z facing yaw (degrees) on every screen that has it in view, the way a dropped item lies: it settles on the ground below the point. world is the virtual world it is in (nil or -1 = the default world, 0). It stays until someone carries it off, the mode removes it (DestroyEntity) or the server restarts.

CreateCarryItem(item, x, y, z [, yaw, world])
Parameter Type
item string the item’s name, id or class GUID
x number metres
y number metres
z number metres - it falls to the ground below the point
yaw number degrees, the way it faces (optional)
world number the virtual world; -1 (the default) = world 0 (optional)

number | nil - the new entity’s id; nil when the item is unknown or the world is full

-- a row of flour sacks by the mill
for i = 0, 3 do
CreateCarryItem("mlynaruvUcen_sackcarryable", -310.0 + i * 0.8, 112.0, 30.0, 90)
end

SetItemCarrying · GivePlayerCarryItem · DestroyEntity · GetEntities · the Carry items group of the index