From RPTools Wiki
Jump to navigation Jump to search

transferVBL() Function

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

Introduced in version
Directly transfers VBL from token to the VBL layer if true; otherwise, it transfers from the VBL layer to the token.


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.


  • value - The value of the setting to set:
    • 0 transfer normal (blue) VBL to token (yellow) VBL
    • 1 transfer token (yellow) VBL to normal (blue) VBL
  • delete - Defines if the transferred VBL is deleted from the source.
  • id - OPTIONAL: The token id of the token for which you want to set this setting, defaults to the Current Token.


Example: Transfer VBL from Token to Map
[h:transferVBL(1, "Dragon")]

Example: Transfer VBL from Map to current Token


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: finalVblData = "{'shape':'none'}"]
[h: setTokenVBL(finalVblData)]

See Also

Version Changes

  • 1.5.0 - new delete parameter