setVisible: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(12 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
== | {{stub|Examples of usage.}} | ||
{{MacroFunction | |||
Sets the [[ | |name=setVisible | ||
|trusted=true | |||
|version=1.3b40 | |||
|description= | |||
Sets the [[Introduction to Tokens#Visible to Players|Visible to Players]] flag on a [[Token]] if the value passed in is non-zero({{true}}), otherwise resets it to {{false}}. The [[Introduction to Tokens#Visible to Players|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= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[ | setVisible(visible) | ||
</syntaxhighlight> | |||
<syntaxhighlight lang="mtmacro" line> | |||
setVisible(visible, id) | |||
</syntaxhighlight> | |||
'''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]] |
Latest revision as of 18:08, 25 April 2023
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
) orfalse
(0
).id
- The tokenid
of the token which has its player visibility set, defaults to the Current Token.
See Also
Version Changes
- 1.3b51 - Added
id
parameter option.