Skip to content

GetMapPrefabParts

A prefab unit’s objects as they stand on the level.

GetMapPrefabParts(id)
Parameter Type
id number the unit

table - a list of GetMapObject’s tables in the prefab’s order (each with part_of = the unit; a door’s key); empty for no unit

-- lock every door of a house
for _, part in ipairs(GetMapPrefabParts(house)) do
if part.key then SetDoorState(part.key, false, true) end
end

CreateMapPrefab · UnpackMapPrefab · the The server’s map group of the index