setLibProperty: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page SetLibProperty to setLibProperty: Converting page titles to lowercase) |
No edit summary |
||
Line 6: | Line 6: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
setLibProperty(name, value) | setLibProperty(name, value) | ||
setLibProperty(name, value, libName) | setLibProperty(name, value, libName) | ||
</ | </syntaxhighlight> | ||
|examples= | |examples= | ||
Set a property on the [[Token:library_token|Library Token]] that the macro is running from. | Set a property on the [[Token:library_token|Library Token]] that the macro is running from. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: setLibProperty("defaultStrength", 10)] | [h: setLibProperty("defaultStrength", 10)] | ||
</ | </syntaxhighlight> | ||
Set a property on a specifig [[Token:library_token|Library Token]]. | Set a property on a specifig [[Token:library_token|Library Token]]. | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: setLibProperty("defaultStrength", 10, "Lib:Character")] | [h: setLibProperty("defaultStrength", 10, "Lib:Character")] | ||
</ | </syntaxhighlight> | ||
Known Bug: note that using setLibProperty during onCampaignLoad and not being on the map where the lib resides, will result in a duplicate of that lib on the current map! | Known Bug: note that using setLibProperty during onCampaignLoad and not being on the map where the lib resides, will result in a duplicate of that lib on the current map! |
Revision as of 20:56, 14 March 2023
setLibProperty() Function
• Introduced in version 1.3b48
Sets the Token Property on a Library Token. if the name of the Library Token is not specified then the Token Property is set on the Library Token that the macro is running from.
Usage
setLibProperty(name, value)
setLibProperty(name, value, libName)
Examples
Set a property on the Library Token that the macro is running from.
Known Bug: note that using setLibProperty during onCampaignLoad and not being on the map where the lib resides, will result in a duplicate of that lib on the current map!
[h: setLibProperty("defaultStrength", 10)]
Set a property on a specifig Library Token.
[h: setLibProperty("defaultStrength", 10, "Lib:Character")]