Difference between revisions of "GetCreatureTalentRandom"

From NWN Lexicon
Jump to: navigation, search
Line 8: Line 8:
  
 
<nwscript>
 
<nwscript>
[[talent | talent ]] GetCreatureTalentRandom(
+
talent GetCreatureTalentRandom(
    [[int | int ]] nCategory,
+
    int nCategory,
    [[object | object ]] oCreature = OBJECT_SELF
+
    object oCreature = OBJECT_SELF
);
+
);
 
</nwscript>
 
</nwscript>
  

Revision as of 01:25, 26 August 2012



GetCreatureTalentRandom(int, object)

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

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

Parameters

nCategory

TALENT_CATEGORY_*

oCreature

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


Description

Returns a random talent of oCreature, within nCategory.



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.


Version

1.22

See Also

functions: 

GetIsTalentValid

constants: 

TALENT_CATEGORY_* Constants



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