GetAssociate(int, object, int)

Returns an object's associate.

object GetAssociate(
    int nAssociateType,
    object oMaster = OBJECT_SELF,
    int nTh = 1
);

Parameters

nAssociateType

ASSOCIATE_TYPE_*

oMaster

PC to get the associate of. (Default: OBJECT_SELF)

nTh

Which associate to return. (Default: 1)


Description

Returns the NPC associated object of oMaster of the specified oAssociateType.
Returns OBJECT_INVALID if no such associate exists for oMaster.



Remarks

The nTh parameter is useful because, since version 1.59, you can allow for more than one henchman using the SetMaxHenchmen command. The nTh parameter is thus equivalent to the nInt parameter in GetHenchman. Currently, the only associate type it is possible to have more than one of at a time is henchmen.


Version

1.61

See Also

functions: AssociateCheck | GetAnimalCompanionCreatureType | GetAssociateCRMax | GetAssociateHealMaster | GetAssociateStartLocation | GetAssociateState | GetFamiliarCreatureType | GetHenchman | GetLastAssociateCommand | GetMaster | RemoveSummonedAssociate | SetAssociateState
categories: Get Data from Creature Functions | Henchmen/Familiars/Summoned Functions
constants: ASSOCIATE_TYPE_* Constants


 author: Charles Feduke, editor: Lilac Soul