setHalo: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page SetHalo to setHalo: Converting page titles to lowercase)
No edit summary
 
Line 6: Line 6:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
setHalo(color)
setHalo(color)
</source>
</syntaxhighlight>
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
setHalo(color, id)
setHalo(color, id)
</source>
</syntaxhighlight>
'''Parameters'''
'''Parameters'''
{{param|color|The color to set the [[Halo]] to, valid values are:
{{param|color|The color to set the [[Halo]] to, valid values are:
Line 28: Line 28:
|examples=
|examples=
To remove the [[Halo]] from the [[Current Token]].
To remove the [[Halo]] from the [[Current Token]].
<source lang="mtmacro" line>
<syntaxhighlight  lang="mtmacro" line>
[h: setHalo("None")]
[h: setHalo("None")]
</source>
</syntaxhighlight>


To set the [[Halo]] for the [[Current Token]] to red.
To set the [[Halo]] for the [[Current Token]] to red.
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: setHalo("Red")]
[h: setHalo("Red")]
</source>
</syntaxhighlight>


To set the [[Halo]] from the [[Current Token]] to a custom color
To set the [[Halo]] from the [[Current Token]] to a custom color
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: setHalo("#33AAFF")]
[h: setHalo("#33AAFF")]
</source>
</syntaxhighlight>


|also=
|also=

Latest revision as of 21:02, 14 March 2023

setHalo() Function

Introduced in version 1.3b49
Sets the Halo color of a Token.

Usage

setHalo(color)
setHalo(color, id)

Parameters

  • color - The color to set the Halo to, valid values are:
    • "Black"
    • "Green"
    • "Yellow"
    • "Orange"
    • "Red"
    • "Cyan"
    • "Magenta"
    • "White"
    • A hexadecimal color value in the format "#RRGGBB"
    • "None"
  • id - The token id of the token that has its Halo set by this function.

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

Examples

To remove the Halo from the Current Token.
[h: setHalo("None")]

To set the Halo for the Current Token to red.

[h: setHalo("Red")]

To set the Halo from the Current Token to a custom color

[h: setHalo("#33AAFF")]

See Also

Version Changes

  • 1.3b51 - Added id parameter option.