setLibProperty: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function setLibProperty== Sets the Token:Token Property on a Token:LibToken. if the name of the Token:LibToken is not specified then the Token:Token Property is set...)
 
Line 1: Line 1:
==Function setLibProperty==
==Function setLibProperty==


Sets the [[Token:Token Property|Token Property]] on a [[Token:LibToken|LibToken]]. if the name of the [[Token:LibToken|LibToken]] is not specified then the [[Token:Token Property|Token Property]] is set on the [[Token:LibToken|LibToken]] 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.




Line 11: Line 11:


===Examples===
===Examples===
Set a property on the [[Token:LibToken|LibToken]] that the macro is running from.
Set a property on the [[Token:library_token|Library Token]] that the macro is running from.
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: setLibProperty("defaultStrength", 10)]
[h: setLibProperty("defaultStrength", 10)]
</source>
</source>


Set a property on a specifig [[Token:LibToken|LibToken]].
Set a property on a specifig [[Token:library_token|Library Token]].
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: setLibProperty("defaultStrength", 10, "Lib:Character")]
[h: setLibProperty("defaultStrength", 10, "Lib:Character")]
</source>
</source>

Revision as of 20:16, 27 December 2008

Function setLibProperty

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

[h: setLibProperty(name, value)]
[h: 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")]