Skip to content

SetMapLayer

Switches a map layer on or off for every player.

Everything in the layer - objects and removals - shows or goes in every game at once, and the server’s collision follows. A new name makes the layer. The switch is written into the map: it is still so after a restart.

SetMapLayer(name, on)
Parameter Type
name string the layer
on boolean true shows it

boolean - true; false and the reason when the server has no map

-- the winter market stands from the first snow to the thaw
SetMapLayer("winter_market", IsWinter())

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