GetMapPrefabParts
A prefab unit’s objects as they stand on the level.
Syntax
Section titled “Syntax”GetMapPrefabParts(id)| Parameter | Type | |
|---|---|---|
id |
number | the unit |
Returns
Section titled “Returns”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
Example
Section titled “Example”-- lock every door of a housefor _, part in ipairs(GetMapPrefabParts(house)) do if part.key then SetDoorState(part.key, false, true) endendSee also
Section titled “See also”CreateMapPrefab · UnpackMapPrefab · the The server’s map group of the index
