Skip to content

GetMapObject

A map object as it stands.

GetMapObject(id)
Parameter Type
id number the object

table - {id, mesh, x, y, z, yaw, pitch, roll, scale, material, tint, solid, view, lod, layer, group, persist, by, revision, nav, use, params, attach, rain, key, prefab, part_of} (mesh is "entity:light", "entity:effect", "entity:sound", "entity:marker" or "entity:door" for what CreateMapLight and its kin make, params their settings; "picture:<name>" or "surface:<page>" for a board - CreateMapPicture, CreateMapSurface; "prefab:<name>" for a prefab placed as one unit - CreateMapPrefab -, prefab then its prefab’s name; part_of the unit an object of a unit belongs to - GetMapPrefabParts -, nil for an object of its own; attach the object it sits on, 0 none; key a door’s key; scale a number, or {x, y, z} for a mesh stretched along its own axes) (by: the admin who last changed it, "" for the mode; revision: the map’s revision at that change); nil when there is none

local o = GetMapObject(id)
if o then Log(string.format("%s at %.1f %.1f %.1f, turned %.0f", o.mesh, o.x, o.y, o.z, o.yaw)) end

GetMapObjectsNear · SetMapObject · the The server’s map group of the index