Skip to content

SetMapObject

Changes a map object - moves, turns, scales it, or anything else it has.

changes holds the fields to change, with the names GetMapObject gives them (x, y, z, yaw, pitch, roll, scale, material, tint, solid, nav, view, lod, layer, group, persist, rain); the rest stay. Every player sees it change at once.

SetMapObject(id, changes)
Parameter Type
id number the object
changes table the fields to change

boolean - true; false and the reason when there is no such object or a value is out of its bounds

-- the gate's bar swings up
SetMapObject(GATE_BAR, {pitch = 80})

CreateMapObject · GetMapObject · the The server’s map group of the index