transferPitVBL: Difference between revisions
Jump to navigation
Jump to search
(Created stub for transferPitVBL function) |
m (Added description; fleshed out the rest of the page) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
{{MacroFunction | {{MacroFunction | ||
|name=transferPitVBL | |name=transferPitVBL | ||
|proposed=false | |||
|trusted=true | |||
|version=1.12 | |version=1.12 | ||
|description= | |description= | ||
Directly transfers Pit VBL from token to the Pit VBL layer if {{code|true}}; otherwise, it transfers from the Pit VBL layer to the token's Pit VBL. | |||
|usage= | |usage= | ||
<syntaxhighlight lang="mtmacro" line> | <syntaxhighlight lang="mtmacro" line> | ||
transferPitVBL(direction) | transferPitVBL(direction) | ||
transferPitVBL(direction, delete) | |||
transferPitVBL(direction, id) | |||
transferPitVBL(direction, delete, id) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="mtmacro" | This function can be used to transfer token Pit VBL to normal Pit VBL, or vice versa. Token VBL moves with the token, can be set under the VBL tab on the Token Editor Dialog, and is colored YELLOW. Normal VBL is static, can be created with the VBL drawing tools, or with the use of the VBL functions, and is colored BLUE. | ||
transferPitVBL( | |||
'''Parameters''' | |||
{{param| direction |This value can be: | |||
** {{code|0}} transfer normal (blue) Pit VBL to token (yellow) Pit VBL | |||
** {{code|1}} transfer token (yellow) Pit VBL to normal (blue) Pit VBL}} | |||
{{param|delete|Defines if the transferred Pit VBL is deleted from the source.}} | |||
{{param|id|OPTIONAL: The token {{code|id}} of the token being acted upon. Defaults to the [[Current Token]].}} | |||
|examples= | |||
''Example: Transfer Pit VBL from Token to Map'' | |||
<syntaxhighlight lang="mtmacro"> | |||
[h: transferPitVBL(1, "Dragon")] | |||
[h: transferPitVBL(0)] | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="mtmacro" | ''Example: Transfer Pit VBL from Map to current Token'' | ||
transferPitVBL( | <syntaxhighlight lang="mtmacro"> | ||
[h: transferPitVBL(0)] | |||
</syntaxhighlight> | </syntaxhighlight> | ||
'' | ''Example: Clear Pit VBL from Token after transfer'' | ||
<syntaxhighlight lang="mtmacro"> | |||
[h: transferPitVBL(1, 1)] | |||
</syntaxhighlight> | |||
|also= | |||
[[Introduction to Vision Blocking]], {{func|erasePitVBL}}, {{func|drawPitVBL}}, {{func|setTokenPitVBL}} | |||
}} | }} | ||
[[Category:Miscellaneous Function]] | |||
[[Category:VBL Function]] | [[Category:VBL Function]] |
Latest revision as of 23:59, 5 June 2023
This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
transferPitVBL() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.12
Directly transfers Pit VBL from token to the Pit VBL layer if
true
; otherwise, it transfers from the Pit VBL layer to the token's Pit VBL.Usage
transferPitVBL(direction)
transferPitVBL(direction, delete)
transferPitVBL(direction, id)
transferPitVBL(direction, delete, id)
This function can be used to transfer token Pit VBL to normal Pit VBL, or vice versa. Token VBL moves with the token, can be set under the VBL tab on the Token Editor Dialog, and is colored YELLOW. Normal VBL is static, can be created with the VBL drawing tools, or with the use of the VBL functions, and is colored BLUE.
Parameters
direction
- This value can be:0
transfer normal (blue) Pit VBL to token (yellow) Pit VBL1
transfer token (yellow) Pit VBL to normal (blue) Pit VBL
delete
- Defines if the transferred Pit VBL is deleted from the source.id
- OPTIONAL: The tokenid
of the token being acted upon. Defaults to the Current Token.
Examples
Example: Transfer Pit VBL from Token to Map
[h: transferPitVBL(1, "Dragon")]
[h: transferPitVBL(0)]
Example: Transfer Pit VBL from Map to current Token
[h: transferPitVBL(0)]
Example: Clear Pit VBL from Token after transfer
[h: transferPitVBL(1, 1)]