SpecialTactics

From NWN Lexicon
Jump to navigationJump to search


SpecialTactics(object)

Checks for the special tactics flags and chooses tactics appropriately for each.

int SpecialTactics(
    object oTarget
);

Parameters

oTarget

The "enemy" target of our tactics.


Description

Checks for the special tactics flags and chooses tactics appropriately for each.

Note that only one special tactics flag should be applied to a single creature for the most part!

Returns TRUE on success, FALSE on failure.

The possible flags are:
  X0_COMBAT_FLAG_AMBUSHER
  X0_COMBAT_FLAG_COWARDLY
  X0_COMBAT_FLAG_DEFENSIVE
  X0_COMBAT_FLAG_RANGED



Requirements

#include " x0_i0_combat "


Version

???

Example

// Lets' check to see if we have any condition set, if we do then we should do the tactics.
#include "x0_i0_combat"

void main()
{
   // Get the last enemy to damage us.
   object oEnemy = GetLastDamager();
 
   // This should check the caller for any X0_COMBAT_FLAG_* settings.
   // If such settings exist, it should call an execution of special tactics associated with that set condition.
   // If that call to special tactics returns TRUE. Then this will return TRUE, else if either of the above is
   // false this will return FALSE.
   SpecialTactics(oEnemy);
}

See Also

functions: 

SpecialTacticsRanged



author: Baragg, editor: Mistress