Check if a creature is using a given action mode.
- Creature to examine
- Action mode to check. ACTION_MODE_* or 12 for Defensive Stance (see Known Bugs)
Gets the status of ACTION_MODE_* modes on a creature. As noted in Known Bugs the value 12 is valid and relates to Defensive Stance.
Use the corresponding SetActionMode if the mode needs to be turned on/off.
Notably only Stealth and Detect modes can be on at the same time as any one of the others, which are considered combat modes and so you can't have ACTION_MODE_FLURRY on at the same time as ACTION_MODE_POWER_ATTACK. Setting one cancels the other.
These 3 older functions:
Still work fine and are just very specific versions of this more general function.
Note that on the start of each OnCombatRoundEnd event the AI will have all combat action modes disabled.
The constant ACTION_MODE_DEFENSIVE_STANCE - value 12 - is missing from nwscript.nss making it non-obvious how to check for such a mode being active. It works perfectly fine with the function however.
author: Lilac Soul, editor: Jasperre, additional contributor(s): Jasperre