GetAbilityScore

From NWN Lexicon
Jump to navigationJump to search

GetAbilityScore(object, int, int)

Get the ability score of a specific type for a creature.

int GetAbilityScore(
    object oCreature,
    int nAbilityType,
    int nBaseAbilityScore = FALSE
);

Parameters

oCreature

The creature whose ability score is sought.

nAbilityType

ABILITY_*

nBaseAbilityScore

If set to TRUE will return the base ability score without bonuses (e.g. ability bonuses granted from equipped items). If nothing entered, defaults to FALSE.

Description

Returns the ability score of type nAbilityType for oCreature (otherwise 0).

Known Bugs

Doesn't work and returns 0 before player execute the OnClientEnter event; that is in OnAcquire and OnEquip events for items the character wear.

Version

1.67

See Also

functions: 

GetWisdom

constants: 

ABILITY_* Constants


 author: Kristian Markon, editor: Mistress