IsBusy

From NWN Lexicon
Revision as of 11:22, 21 August 2012 by Dood (talk | contribs) (Created page with " =IsBusy()= Determines whether an associate is busy. int  IsBusy(); ====Description==== Determines whether an associate is busy with combat or o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



IsBusy()

Determines whether an associate is busy.

 int  IsBusy();

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