setHalo: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Updated with recent version changes.)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name=setHalo
|name=setHalo
|version=1.3b49
|description=
|description=
Sets the [[Token:Halo|Halo]] color of the [[Token:Current Token|Current Token]]. The valid values for this function are
Sets the [[Halo]] color of a [[Token]].
* Black
* Green
* Yellow
* Orange
* Red
* Cyan
* Magenta
* White
* A hexadecimal string in the format #''rrggbb''.
* None


|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: setHalo(color)]
setHalo(color)
</source>
</source>
<source lang="mtmacro" line>
setHalo(color, id)
</source>
'''Parameters'''
{{param|color|The color to set the [[Halo]] to, valid values are:
** {{code|"Black"}}
** {{code|"Green"}}
** {{code|"Yellow"}}
** {{code|"Orange"}}
** {{code|"Red"}}
** {{code|"Cyan"}}
** {{code|"Magenta"}}
** {{code|"White"}}
** A hexadecimal color value in the format {{code|"#RRGGBB"}}
** {{code|"None"}} }}
{{param|id|The token {{code|id}} of the token that has its [[Halo]] set by this function. {{TrustedParameter}} }}


|examples=
|examples=
To remove the [[Token:Halo|Halo]] from the [[Token:Current Token|Current Token]].
To remove the [[Halo]] from the [[Current Token]].
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: setHalo("None")]
[h: setHalo("None")]
</source>
</source>


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


To set the [[Token:Halo|Halo]] from the [[Token:Current Token|Current Token]] to a custom color
To set the [[Halo]] from the [[Current Token]] to a custom color
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: setHalo("#33AAFF")]
[h: setHalo("#33AAFF")]
</source>
</source>
|also=
[[Halo]],
[[getHalo|getHalo()]]
|changes=
{{change|1.3b51|Added {{code|id}} parameter option.}}
}}
}}
[[Category:Token Function]]
[[Category:Token Function]]

Revision as of 00:31, 31 March 2009

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.