SetActionMode

From NWN Lexicon
Jump to: navigation, search



SetActionMode(object, int, int)

Sets the status of an action mode on a creature

void SetActionMode(
    object oCreature,
    int nMode,
    int nStatus
);

Parameters

oCreature

Creature to set the action mode on

nMode

ACTION_MODE_*

nStatus

TRUE or FALSE


Description

Sets the status of modes ACTION_MODE_* on a creature.



Version

1.61

Example

//Make PC exit stealth mode if currently stealthy
void main()
{
object oPC=GetEnteringObject();
 
if (GetActionMode(oPC, ACTION_MODE_STEALTH)==TRUE)
   SetActionMode(oPC, ACTION_MODE_STEALTH, FALSE);
}

See Also

functions: 

GetActionMode

constants: 

ACTION_MODE_* Constants



 author: Lilac Soul