IsBusy

From NWN Lexicon
Revision as of 01:37, 26 August 2012 by Dood (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search



IsBusy()

Determines whether an associate is busy.

Description

Determines whether an associate is busy with combat or other tasks.



Remarks

This checks local ints that were set up by other associate functions. SetIsBusy can be used to set a henchmen to busy (like when unlocking an object).


Requirements

#include " nw_i0_assoc "

Version

1.22

Example

// 1.24 source for this function
int IsBusy()
{
        // * if no valid attack targets then I am not in combat
        if (GetIsObjectValid(GetAttackTarget()) == FALSE && GetIsObjectValid(GetAttemptedAttackTarget()) == FALSE && GetLocalInt(OBJECT_SELF,"NW_ASSOCAMIBUSY") == FALSE)
        {
                return FALSE;
        }
        return TRUE;
}

See Also

functions: 

SetIsBusy



 author: Tom Cassiotis