setOwnedByAll: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page setOwnedByAll to SetOwnedByAll without leaving a redirect: Converting page title to first-letter uppercase) |
No edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
setOwnedByAll(owned) | setOwnedByAll(owned) | ||
setOwnedByAll(owned, id) | setOwnedByAll(owned, id) | ||
setOwnedByAll(owned, id, | setOwnedByAll(owned, id, mapRef) | ||
</ | </syntaxhighlight> | ||
'''Parameter''' | '''Parameter''' | ||
{{param|owned|The value of the setting to set, {{true}} or {{false}}.}} | {{param|owned|The value of the setting to set, {{true}} or {{false}}.}} | ||
{{param|id|The token {{code|id}} of the token which has its [[Introduction_to_Tokens#Ownership|Owned by All]] status set, defaults to the [[Current Token]]. {{TrustedParameter}} }} | {{param|id|The token {{code|id}} of the token which has its [[Introduction_to_Tokens#Ownership|Owned by All]] status set, defaults to the [[Current Token]]. {{TrustedParameter}} }} | ||
{{param| | {{param|mapRef|The Name or ID of the map to find the token. Defaults to the current map.}} | ||
|example= | |example= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: setOwnedByAll(1)] | [h: setOwnedByAll(1)] | ||
[h: setOwnedByAll(0, "Dragon")] | [h: setOwnedByAll(0, "Dragon")] | ||
</ | </syntaxhighlight> | ||
|also= | |also= |
Latest revision as of 23:59, 14 March 2023
setOwnedByAll() Function
• Introduced in version 1.4.2.0
Allows changing the ownedByAll value of a token.
Usage
setOwnedByAll(owned)
setOwnedByAll(owned, id)
setOwnedByAll(owned, id, mapRef)
Parameter
owned
- The value of the setting to set,true
(1
) orfalse
(0
).id
- The tokenid
of the token which has its Owned by All status set, defaults to the Current Token.Note: This parameter can only be used in a Trusted Macro.
mapRef
- The Name or ID of the map to find the token. Defaults to the current map.
Example
[h: setOwnedByAll(1)]
[h: setOwnedByAll(0, "Dragon")]
See Also
Version Changes
- 1.5.4 - Added
mapname
parameter option.