GetIsFighting
From NWN Lexicon
Contents |
[edit] GetIsFighting(object)
Determines whether a creature is "fighting".
int GetIsFighting( object oFighting );
[edit] Parameters
oFighting
Not used
[edit] Description
Returns TRUE if the NPC whose script this function is called from has attempted to cast a spell or attack any targets, otherwise FALSE.
[edit] Remarks
Uses GetAttemptedSpellTarget () to determine if the creature is fighting.
[edit] Requirements
#include " x0_inc_generic "
[edit] Version
1.22
[edit] Example
// This is the source code for the function int GetIsFighting(object oFighting) { object oAttack = GetAttemptedAttackTarget(); object oSpellTarget = GetAttemptedSpellTarget(); if(GetIsObjectValid(oAttack) || GetIsObjectValid(oSpellTarget)) { return TRUE; } return FALSE; }
[edit] See Also
functions: |
author: Tom Cassiotis, editors: John Shuell, Mistress