FANDOM


// Get the current action (ACTION_*) that oObject is executing.
int GetCurrentAction(object oObject=OBJECT_SELF);

Some of the values listed in actions.2da such as Disarm and Knockdown, while valid in NWN1, will not return a correct value with this function due to the way the NWN2 engine handles combat. In the case of Disarm and Knockdown, both return a value of 3; the value for the constant ACTION_ATTACKOBJECT better known as the standard attack action. The toolset listing of the ACTION_* constants is accurate, but when scripting for specific actions it helps to be aware of the limitations of this function.

Using a feat with an attached spell script will return the constant ACTION_CASTSPELL. In theory, one could use the function GetSpellId to help determine the specific feat being used, but as of this writing the author has not fully tested it.