PlaceMapPrefab
Places a prefab’s objects as new map objects.
Syntax
Section titled “Syntax”PlaceMapPrefab(name, x, y, z [, opts])| Parameter | Type | |
|---|---|---|
name |
string | the prefab |
x |
number | metres - where its pivot goes |
y |
number | metres |
z |
number | metres; below 0 = on the ground |
opts |
table | yaw (degrees, turns the whole prefab about its pivot), layer ("base"), persist (true) (optional) |
Returns
Section titled “Returns”table - the new objects’ ids in the prefab’s order; nil and the reason
Example
Section titled “Example”-- a row of stallsfor i = 0, 3 do PlaceMapPrefab("stall", 1280 + i * 4, 1100, -1, {yaw = 180, persist = false}) endSee also
Section titled “See also”SaveMapPrefab · GetMapPrefabs · CreateMapPrefab · the The server’s map group of the index
