getTokenVBL: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(More verbose description of its use plus links to other VBL functions.)
(Sigh. Corrected function links.)
Line 11: Line 11:
</source>
</source>


This macro function is used used to get a JSON object describing the TOKEN VBL attached to a token.  The returned JSON object can then be used with setTokenVBL, drawVBL or eraseVBL.
This macro function is used used to get a JSON object describing the TOKEN VBL attached to a token.  The returned JSON object can then be used with {{func|setTokenVBL}}, {{func|drawVBL}}or {{func|eraseVBL}}.


Token VBL is attached to and moves with the token.  It can  be set (or cleared) under the VBL tab on the Edit Token dialog and is colored YELLOW. Normal VBL is static, can be created with the VBL drawing tools or with the use of VBL functions and is colored BLUE.
Token VBL is attached to and moves with the token.  It can  be set (or cleared) under the VBL tab on the Edit Token dialog and is colored YELLOW. Normal VBL is static, can be created with the VBL drawing tools or with the use of VBL functions and is colored BLUE.
Line 24: Line 24:


|also=
|also=
[[Introduction to Vision Blocking ]], {{func|setTokenVBL}}, {{function|drawVBL}} or {{function|eraseVBL}}
[[Introduction to Vision Blocking ]], {{func|setTokenVBL}}, {{func|drawVBL}} or {{func|eraseVBL}}
}}
}}
[[Category:Miscellaneous Function]]
[[Category:Miscellaneous Function]]
[[Category:VBL Function]]
[[Category:VBL Function]]

Revision as of 21:06, 20 August 2018

getTokenVBL() Function

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

Introduced in version 1.4.1.6
Gets the VBL attached to a token as a JSON object.

Usage

getTokenVBL(id)

This macro function is used used to get a JSON object describing the TOKEN VBL attached to a token. The returned JSON object can then be used with setTokenVBL(), drawVBL()or eraseVBL().

Token VBL is attached to and moves with the token. It can be set (or cleared) under the VBL tab on the Edit Token dialog and is colored YELLOW. Normal VBL is static, can be created with the VBL drawing tools or with the use of VBL functions and is colored BLUE.

Parameters

  • id - OPTIONAL: The token id of the token for which you want to set this setting, defaults to the Current Token.

Example:

[h: vbl = getTokenVBL("Door, Steel")]
[h: setTokenVBL(vbl, "Door, Wood")]



See Also