Contents |
Note: This function can only be used in a Trusted Macro
Sets the Map Layer that a Token is on.
The Map Layer is one of:
TOKEN
GM also known as Hidden
OBJECT
BACKGROUND
setLayer(layer)
setLayer(layer, id)
Parameters
layer - The layer to move the Token to.
id - The token id of the token which has its layer set, defaults to the Current Token.
When an NPC token is dead, send it to the Object layer, otherwise leave it where it is.
[h: layerName = getLayer()][h: layerName = if(state.Dead&&isNPC(), "OBJECT", layerName)][h: setLayer(layerName)]Toggle a token between the Hidden and Token layers.
[h: layerName = getLayer()][h: layerName = if(layerName=="GM", "TOKEN", "GM")][h: setLayer(layerName)]id parameter option.