setLibProperty: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 2: Line 2:
|name=setLibProperty
|name=setLibProperty
|version=1.3b48
|version=1.3b48
|description
|description=
Sets the [[Token:token_property|Token Property]] on a [[Token:library_token|Library Token]]. if the name of the [[Token:library_token|Library Token]] is not specified then the [[Token:token_property|Token Property]] is set on the [[Token:library_token|Library Token]] that the macro is running from.
Sets the [[Token:token_property|Token Property]] on a [[Token:library_token|Library Token]]. if the name of the [[Token:library_token|Library Token]] is not specified then the [[Token:token_property|Token Property]] is set on the [[Token:library_token|Library Token]] that the macro is running from.



Revision as of 03:51, 1 March 2019

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.
[h: setLibProperty("defaultStrength", 10)]

Set a property on a specifig Library Token.

[h: setLibProperty("defaultStrength", 10, "Lib:Character")]
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!