GetAssociate(int, object, int)
Returns an object's associate.
- PC to get the associate of. (Default: OBJECT_SELF)
- Which associate to return. (Default: 1)
Returns the NPC associated object of oMaster of the specified oAssociateType.
Returns OBJECT_INVALID if no such associate exists for oMaster.
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.
Using GetAssociate(ASSOCIATE_TYPE_DOMINATED, 2) will return the same value as GetAssociate(ASSOCIATE_TYPE_DOMINATED, 1) meaning if you code a loop of all associates be careful to only go onto the 2nd associate if it is ASSOCIATE_TYPE_HENCHMAN (see SetMaxHenchmen) or ASSOCIATE_TYPE_SUMMONED (you can get more than one - see EffectSummonCreature).
author: Charles Feduke, editor: Lilac Soul