setHasSight: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page SetHasSight to setHasSight: Converting page titles to lowercase) |
No edit summary |
||
Line 7: | Line 7: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
setHasSight(state) | setHasSight(state) | ||
setHasSight(state, id) | setHasSight(state, id) | ||
setHasSight(state, id, mapname) | setHasSight(state, id, mapname) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
Line 21: | Line 21: | ||
|example= | |example= | ||
Enables sight for [[Current Token]] | Enables sight for [[Current Token]] | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: setHasSight(1)] | [h: setHasSight(1)] | ||
</ | </syntaxhighlight> | ||
Returns: Empty String. | Returns: Empty String. | ||
Revision as of 21:01, 14 March 2023
setHasSight() Function
• Introduced in version 1.3b48
Enables/disables sight for the Current Token. If the argument is 0 (false) sight will be disabled on the Current Token. If it is non-zero (true) sight is enabled.
Usage
setHasSight(state)
setHasSight(state, id)
setHasSight(state, id, mapname)
Parameters
state
- Boolean - true to enable sight, false to disableid
- Theid
of the token to set the sight of. Defaults to the Current Token.Note: This parameter can only be used in a Trusted Macro.
mapname
- The name of the map to find the token. Defaults to the current map.
Example
Enables sight for Current Token
Returns: Empty String.
[h: setHasSight(1)]
Version Changes
- 1.5.4 - Added
id
andmapname
parameter options.