setVisible: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version, cleaned up formatting.)
m (Updated with recent version changes.)
Line 1: Line 1:
{{stub}}
{{stub|Examples of usage.}}
{{MacroFunction
{{MacroFunction
|name=setVisible
|name=setVisible
Line 5: Line 5:
|version=1.3b40
|version=1.3b40
|description=
|description=
Sets the [[Token:visible to players|visible to players]] flag is set on the [[Token:Current Token|Current Token]] if the value passed in is non zero, otherwise resets it. The [[Token:visible to players|visible to players]] flag has two meanings, on a normal [[Token:Token|Token]] players will only be able to see the [[Token:Token|Token]] if it is set (when all other things like [[Map:Fog of War|Fog of War]] etc are taken into account). If it is a [[Token:LibToken|LibToken]] then it determines if players can call [[Macro:Macros|Macros]] using [[Macro:Roll:macro | [macro(...): ...] ]].
Sets the [[Visible to Players]] flag on a [[Token]] if the value passed in is non-zero({{true}}), otherwise resets it to {{false}}. The [[Visible to Players]] flag has two meanings, on a normal [[Token]] players will only be able to see the [[Token]] if it is set (when all other things like [[Fog of War]] etc are taken into account). If it is a [[Library Token]] then it determines if players can call [[:Category:Macro]]s using the [[Macros:Branching_and_Looping| [macro(...): ...] ]] roll option.


|usage=
|usage=
Line 11: Line 11:
setVisible(visible)
setVisible(visible)
</source>
</source>
'''Parameter'''
<source lang="mtmacro" line>
* {{code|visible}} - The state of visibility, {{code|true}}({{code|1}}) or {{code|false}}({{code|0}}).
setVisible(visible, id)
</source>
'''Parameters'''
{{param|visible|The state of visibility, {{true}} or {{false}}.}}
{{param|id|The token {{code|id}} of the token which has its player visibility set, defaults to the [[Current Token]].}}
 
|also=
[[getVisible|getVisible()]]
 
|changes=
{{change|1.3b51|Added {{code|id}} parameter option.}}


}}
}}
[[Category:Token Function]]
[[Category:Token Function]]

Revision as of 01:43, 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.

setVisible() Function

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

Introduced in version 1.3b40
Sets the Visible to Players flag on a Token if the value passed in is non-zero(true(1)), otherwise resets it to false(0). The Visible to Players flag has two meanings, on a normal Token players will only be able to see the Token if it is set (when all other things like Fog of War etc are taken into account). If it is a Library Token then it determines if players can call Category:Macros using the [macro(...): ...] roll option.

Usage

setVisible(visible)
setVisible(visible, id)

Parameters

  • visible - The state of visibility, true(1) or false(0).
  • id - The token id of the token which has its player visibility set, defaults to the Current Token.


See Also

Version Changes

  • 1.3b51 - Added id parameter option.