transferVBL: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(10 intermediate revisions by 6 users not shown) | |||
Line 3: | Line 3: | ||
|proposed=false | |proposed=false | ||
|trusted=true | |trusted=true | ||
|version=1. | |version=1.4.2.0 | ||
|description= | |description= | ||
Directly transfers VBL from token to the VBL layer if true; otherwise, it transfers from the VBL layer to the token. | |||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
transferVBL(value) | |||
transferVBL(value, delete) | |||
transferVBL(value, id) | transferVBL(value, id) | ||
</ | transferVBL(value, delete, id) | ||
</syntaxhighlight> | |||
This function can be used to transfer TOKEN VBL to NORMAL VBL or vice versa. Token | This function can be used to transfer TOKEN VBL to NORMAL VBL or vice versa. Token VBL moves with the token, can be set under the VBL tab on the token '''Edit...''' menu, 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''' | '''Parameters''' | ||
{{param|value|The value of the setting to set | {{param|value|The value of the setting to set: | ||
{{param|id|OPTIONAL: The token {{code|id}} of the token for which you want to set this setting, defaults to the [[Current Token]]. }} | ** {{code|0}} transfer normal (blue) VBL to token (yellow) VBL}} | ||
** {{code|1}} transfer token (yellow) VBL to normal (blue) VBL | |||
{{param|delete|Defines if the transferred VBL is deleted from the source.}} | |||
{{param|id|OPTIONAL: The token {{code|id}} of the token for which you want to set this setting, defaults to the [[Current Token]].}} | |||
|examples= | |||
''Example: Transfer VBL from Token to Map'' | |||
<syntaxhighlight lang="mtmacro"> | |||
[h:transferVBL(1, "Dragon")] | |||
[h:transferVBL(0)] | |||
</syntaxhighlight> | |||
''Example:''< | ''Example: Transfer VBL from Map to current Token'' | ||
<syntaxhighlight lang="mtmacro"> | |||
[h:transferVBL(0)] | [h:transferVBL(0)] | ||
</ | </syntaxhighlight> | ||
''Example: Clear VBL from Token after transfer since 1.5.1'' | |||
<syntaxhighlight lang="mtmacro"> | |||
[h:transferVBL(1, 1)] | |||
</syntaxhighlight> | |||
''Example: Clear VBL from Token after transfer before 1.5.1'' | |||
<syntaxhighlight lang="mtmacro"> | |||
[h:transferVBL(1)] | |||
[h: finalVblData = "{'shape':'none'}"] | |||
[h: setTokenVBL(finalVblData)] | |||
</syntaxhighlight> | |||
|changes= | |||
{{change|1.5.0|new delete parameter}} | |||
|also= | |also= | ||
[[Introduction to Vision Blocking ]], {{func|eraseVBL}}, {{func|drawVBL}} | [[Introduction to Vision Blocking ]], {{func|eraseVBL}}, {{func|drawVBL}}, {{func|setTokenVBL}} | ||
}} | }} | ||
[[Category:Miscellaneous Function]] | [[Category:Miscellaneous Function]] | ||
[[Category:VBL Function]] | [[Category:VBL Function]] |
Latest revision as of 23:59, 14 March 2023
transferVBL() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.4.2.0
Directly transfers VBL from token to the VBL layer if true; otherwise, it transfers from the VBL layer to the token.
Usage
transferVBL(value)
transferVBL(value, delete)
transferVBL(value, id)
transferVBL(value, delete, id)
This function can be used to transfer TOKEN VBL to NORMAL VBL or vice versa. Token VBL moves with the token, can be set under the VBL tab on the token Edit... menu, 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
value
- The value of the setting to set:0
transfer normal (blue) VBL to token (yellow) VBL1
transfer token (yellow) VBL to normal (blue) VBL
delete
- Defines if the transferred VBL is deleted from the source.id
- OPTIONAL: The tokenid
of the token for which you want to set this setting, defaults to the Current Token.
Examples
Example: Transfer VBL from Token to Map
[h:transferVBL(1, "Dragon")]
[h:transferVBL(0)]
Example: Transfer VBL from Map to current Token
[h:transferVBL(0)]
Example: Clear VBL from Token after transfer since 1.5.1
[h:transferVBL(1, 1)]
Example: Clear VBL from Token after transfer before 1.5.1
[h:transferVBL(1)]
[h: finalVblData = "{'shape':'none'}"]
[h: setTokenVBL(finalVblData)]
See Also
Version Changes
- 1.5.0 - new delete parameter