static int Parser.FindWordID(string wordToFind)
Looks up wordToFind in the text parser dictionary, and returns the ID number.
If the word is not found, returns -1.
Otherwise, the Word Group number is returned, as seen in the Text Parser tab in the editor.
You can determine if two words are synonyms by looking them both up and seeing if the
returned IDs are the same.
Ignore words are returned as ID 0.
This function is useful if you want to use the AGS Text Parser dictionary, but implement
some custom parsing functionality instead of using the standard ParseText function.
Example:
if (Parser.FindWordID("machine") > 0)
{
Display("machine is in the game dictionary");
}
will display a message if the game dictionary includes "machine"
Compatibility: Supported by AGS 3.1.0 and later versions.
See Also: Parser.ParseText
|