GetAnimationCondition
From NWN Lexicon
Jump to navigationJump to search
GetAnimationCondition(int, object)
Returns TRUE if the given creature has the given condition set.
Parameters
nCondition
The animation flag to check for.
oCreature
The object to check for the condition. (Default: OBJECT_SELF)
Description
Returns TRUE if the given creature has the given condition set.
Requirements
#include " x0_i0_anims "
Version
???
Example
// Check to see if the critter has the NW_ANIM_FLAG_CHATTER flag set.
// If they do, tell them to hush up.
#include "x0_i0_anims"
void main()
{
// Test the flag
int nCheck = GetAnimationCondition(NW_ANIM_FLAG_CHATTER, OBJECT_SELF);
// It is set, so turn it off.
if(TRUE == nCheck)
{
SetAnimationCondition(NW_ANIM_FLAG_CHATTER, FALSE, OBJECT_SELF);
}
}
// If they do, tell them to hush up.
#include "x0_i0_anims"
void main()
{
// Test the flag
int nCheck = GetAnimationCondition(NW_ANIM_FLAG_CHATTER, OBJECT_SELF);
// It is set, so turn it off.
if(TRUE == nCheck)
{
SetAnimationCondition(NW_ANIM_FLAG_CHATTER, FALSE, OBJECT_SELF);
}
}
See Also
functions: |
author: Baragg, editor: Mistress