getMacroLocation
getMacroLocation() Function
• Introduced in version 1.3b48
Returns the location of the macro being executed, the return value will be "chat", "global", "campaign" or the label of the token the macro resides on (e.g. "Lib:Utilities" or "Token:Orc".) Standard PC and NPC tokens will have their label prefixed with Token:.
Usage
Example
[h: MacroLocation = getMacroLocation()]
[if(MacroLocation == "chat", "You are running from chat", "You are running from "+MacroLocation]
Version Changes
- 1.3b51 - Now accurately reports where the macro button resides.
Token: A visual marker representing a character, monster, or NPCMacro Button: The visual representation of a Macro, usually referred to explicitly for good reason.Macro: A series of text instructions used to automate processes in MapTool.Campaign: A zipped XML file with the '''.cmpgn''' file extension containing tokens, maps, token macros, campaign macros, and token propertiesMap: An image file displayed in the map display area in MapTool. This image is shared among all connected players and the GM.