setLayer: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version.)
m (Updated with recent version changes.)
Line 1: Line 1:
{{stub|Examples of usage.}}
{{MacroFunction
{{MacroFunction
|name=setLayer
|name=setLayer
|trusted=true
|trusted=true
|version=1.3b48
|version=1.3b48
|description
|description=
Sets the [[Map:map layer|map layer]] that the [[Token:Current Token|Current Token]] is on.
Sets the [[Map Layer]] that a [[Token]] is on.
The [[Map:map layer|map layer]] is one of:
 
* TOKEN
The [[Map Layer]] is one of:
* BACKGROUND
* {{code|TOKEN}}
* GM
* {{code|GM}} also known as Hidden
* OBJECT
* {{code|OBJECT}}
* {{code|BACKGROUND}}


|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
setLayer(layerName)
setLayer(layer)
</source>
<source lang="mtmacro" line>
setLayer(layer, id)
</source>
</source>
'''Parameters'''
{{param|layer|The layer to move the [[Token]] to.}}
{{param|id|The token {{code|id}} of the token which has its layer set, defaults to the [[Current Token]].}}
|also=
[[getLayer|getLayer()]]
|changes=
{{change|1.3b51|Added {{code|id}} parameter option.}}
}}
}}
[[Category:Token Function]]
[[Category:Token Function]]

Revision as of 03:16, 31 March 2009

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
 This article needs: Examples of usage.

setLayer() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.3b48
Sets the Map Layer that a Token is on.

The Map Layer is one of:

  • TOKEN
  • GM also known as Hidden
  • OBJECT
  • BACKGROUND

Usage

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.


See Also

Version Changes

  • 1.3b51 - Added id parameter option.