GetActionMode(object, int)

Check if a creature is using a given action mode

int GetActionMode(
    object oCreature,
    int nMode
);

Parameters

oCreature

Creature to examine

nMode

ACTION_MODE_*


Description

Gets the status of ACTION_MODE_* modes on a creature.



Remarks

Use the corrisponding SetActionMode() if the mode needs to be turned on/off.

These 3 functions:
- GetDetectMode()
- GetDefensiveCastingMode()
- GetStealthMode()

Still work fine.


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: SetActionMode
categories: Get Data from Creature Functions | Miscellaneous Functions
constants: ACTION_MODE_* Constants


 author: Lilac Soul, editor: Jasperre, additional contributor(s): Jasperre