SetBehaviorState(int, int)
Sets an NPC's behavior.
void SetBehaviorState( int nCondition, int bValid = TRUE );
Parameters
nCondition
bValid
Status of nCondition behavior (on/off). (Default: TRUE)
Description
Behavior of NPC is turned on/off by use of bValid. Behaviors follow the NW_FLAG_BEHAVIOR_* constant list.
Known Bugs
Some reports of SetBehaviorState auto-switching bValid have been seen.
Requirements
#include "x0_i0_behavior"
Version
1.28
See Also
functions: | DetermineSpecialBehavior | GetBehaviorState |
categories: | Core AI Functions | Targeting Functions |
constants: | NW_FLAG_BEHAVIOR_* Constants |
events: | OnPerception Event | OnSpawn Event |
author: Jody Fletcher, editor: Charles Feduke, Mistress, additional contributor(s): Kai