AssociateCheck(object)

Checks whether an object is an henchman or not.

int AssociateCheck(
    object oCheck
);

Parameters

oCheck

The object whose henchman status you want to determine.


Description

This is a function in the generic AI script, used as part of the determination of the number of friendly creatures in an area.



Remarks

As the code below shows, AssociateCheck wraps GetAssociate() with an object comparison. GetAssociate may be clearer to use in your scripts.


Requirements

#include "nw_i0_generic"

Version

1.22

Example

// This is the AssociateCheck code from nw_i0_generic
int AssociateCheck(object oCheck)
{
    object oHench = GetAssociate (ASSOCIATE_TYPE_HENCHMAN);
    if(oCheck != oHench)
    {
        return TRUE;
    }
    return FALSE;
}

See Also

functions: CheckFriendlyFireOnTarget | GetAssociate
categories: Combat Functions | Core AI Functions


 author: Iskander Merriman, editor: Dave Robinson
 Send comments on this topic.