GetFamiliarCreatureType

From NWN Lexicon
Jump to navigationJump to search



GetFamiliarCreatureType(object)

Gets the PC's familiar creature type.

int GetFamiliarCreatureType(
    object oCreature
);

Parameters

oCreature

The PC who has a familiar.


Description

Returns oCreature's familiar creature type FAMILIAR_CREATURE_TYPE_* Constants .

Returns FAMILIAR_CREATURE_TYPE_NONE if oCreature is invalid or does not currently have a familiar.



Remarks

Returns no information for summoned creatures. Note that an animal companion is different from a familiar.

This function returns the type of familiar that can be summoned, not the type of familiar that is currently summoned, so you can't use this to determine if a familiar has been summoned or not.

If oCreature is possessing the familiar when this function is called, it will return FAMILIAR_TYPE_NONE. Presumably this is because a possessed familiar can't summon a familiar.


Known Bugs

This function returns 0 (FAMILIAR_CREATURE_TYPE_BAT) instead of 255 (FAMILIAR_CREATURE_TYPE_NONE) if oCreature does not have a familiar at all. If the goal is to check if oCreature could summon a familiar, GetHasFeat(FEAT_SUMMON_FAMILIAR, oCreature) may be a more reliable check.


Version

1.61

See Also

functions: 

SummonFamiliar, GetFamiliarName

constants: 

FAMILIAR_CREATURE_TYPE_* Constants



 author: Charles Feduke, editor: Jody Fletcher, additional contributor(s): Jody Fletcher, Gene Koo, Don Allman