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
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
- The object to attack.
- 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).