Skip to content

SaveMapPrefab

Saves map objects as a prefab, to place again anywhere.

The objects’ places are kept relative to the ground under the first one; the same name overwrites - and every unit of that prefab on the map (CreateMapPrefab) changes with it, on every player’s game. A unit among the ids is saved as its objects. Prefabs live in the map’s prefabs/ folder and go with an export. In the editor, select the objects and use “Save as prefab”; admins: /map prefab save <name> <id...>.

SaveMapPrefab(name, ids)
Parameter Type
name string letters, digits, _ and -, at most 48
ids table a list of map object ids (at most 256)

boolean, string - true, or false and the reason

SaveMapPrefab("stall", {12, 13, 14})

PlaceMapPrefab · DeleteMapPrefab · the The server’s map group of the index