The ActionAttack() NWScript command causes the caller (who must be a creature) to attack the indicated object with whatever weapon is currently equipped. This command will not automatically cause the target to retaliate, nor will it by itself alter reputation. This command is most appropriate when a simple physical combat is desired; to give the caller more options for hostility (including feats and spells), the AI function DetermineCombatRound() should be used instead.

In order to cause a different creature to make the attack, this command must be assigned via AssignCommand().

Unlike most action commands, ActionAttack() is performed immediately, bypassing the action queue. This can have some unforeseen peculiarities when other actions are added to the queue in the same script. In order to place an attack in the queue, this command must be placed inside ActionDoCommand().


void ActionAttack (object oAttackee, int bPassive=FALSE)

object oAttackee 
The object to attack.
int bPassive 
If this is TRUE, the attack is in passive mode, meaning the caller will not move to attack (so there could be no result if the caller has a melee weapon equipped).

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.