SetPlayerMapLayer
Shows (or hides) a map layer to one player alone.
The player’s game draws the layer on or off whatever the map’s own switch is (SetMapLayer) - a quest’s camp only its hero sees,
a house’s furnished rooms for its owner. Their game alone: the server’s own world keeps the map’s switch - a layer shown to one
player is not solid on the server (nothing holds back a walker there), one hidden from them still holds them back - and so do the
areas. nil gives the player the map’s own switch again; a rejoin starts from the map’s.
Syntax
Section titled “Syntax”SetPlayerMapLayer(pid, layer [, on])| Parameter | Type | |
|---|---|---|
pid |
number | the player |
layer |
string | a map layer |
on |
boolean | true shown, false hidden, nil the map’s own switch (optional) |
Returns
Section titled “Returns”boolean - false when the map has no such layer
Example
Section titled “Example”-- the camp is off for everyone; the hero sees itSetMapLayer("bandit_camp", false)SetPlayerMapLayer(hero, "bandit_camp", true)See also
Section titled “See also”GetPlayerMapLayers · SetMapLayer · the The server’s map group of the index
