GetCreatureTalentRandom

From NWN Lexicon

Contents

[edit] GetCreatureTalentRandom(int, object)

Retrieves a random talent from a group of talents that a creature possesses.

talent GetCreatureTalentRandom(
    int nCategory,
    object oCreature = OBJECT_SELF
);

[edit] Parameters

nCategory

TALENT_CATEGORY_*

oCreature

The creature who potentially possesses a talent within the specified talent category. (Default: OBJECT_SELF)


[edit] Description

Returns a random talent of oCreature, within nCategory.

[edit] Remarks

It is possible for nCreature not to have any talent within the specified nCategory. In this case this function will return an invalid talent, akin to OBJECT_INVALID, but you must use the GetIsTalentValid() to test this.

Specifying nCategory 1 actually returns talents of category 11 and vice versa.

Returns invalid talent if the creature is immobilized (toolset speed setting, entangle effect or cutscene immobility).

If nCategory = 0, returns anything without category, known feats (but not with 0 uses) and skills

[edit] Version

1.22

[edit] See Also

functions: 

GetIsTalentValid

constants: 

TALENT_CATEGORY_* Constants



 author: Tom Cassiotis, editor: Charles Feduke, additional contributor(s): Jim Allen
 

Personal tools
Categories