-
Notifications
You must be signed in to change notification settings - Fork 0
MatchingAttrNames.js
kyleady edited this page Jul 10, 2017
·
1 revision
When searching through a character's attributes, you will sometimes want to include a graphic's local values for attributes. Since these local values work differently than roll20 attribute objects, only an array of matching names will be returned. You are expected to use attrValue() to access this attribute or local value.
matchingAttrNames(graphicid, phrase)
- graphicid is the id of the roll20 graphic that represents a character.
- phrase will be broken down into case-insensitive keywords.
Returns an array of names of all of the attribute names that match the given phrase, including all of the temporary attributes stored in the graphic's gmnotes that match.
If one of the matches is an exact match to the phrase, the function will return an array only including the exact match.