WoW:API AttackTarget: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (updated my note from earlier. special case with using fns like TargetNearestEnemy().)
No edit summary
Line 28: Line 28:
: Attacks the players selected target.
: Attacks the players selected target.
----
----
This is actually a toggle.  If not currently attacking, it will initiate attack.  If currently attacking, it will stop attacking.


''If you need a way to always engage auto-attack, rather than toggle it on or off, one workaround I've used is'' AssistUnit("player"); ''this will always attack if you have "Attack on assist" checked in the Advanced tab of the Interface Options panel. (Although, I should add that I've had trouble mixing this with ''TargetNearestEnemy()'' in the same macro - the "Assist" target info isn't updated fast enough I guess) -- [[User:JamesNeko|JamesNeko]] 07:03, 4 Mar 2006 (EST)''
''If you need a way to always engage auto-attack, rather than toggle it on or off, one workaround I've used is'' AssistUnit("player"); ''this will always attack if you have "Attack on assist" checked in the Advanced tab of the Interface Options panel. (Although, I should add that I've had trouble mixing this with ''TargetNearestEnemy()'' in the same macro - the "Assist" target info isn't updated fast enough I guess) -- [[User:JamesNeko|JamesNeko]] 07:03, 4 Mar 2006 (EST)''

Revision as of 05:57, 2 April 2006

AttackTarget -Documentation by AlexanderYoshi-

Attacks the players selected target.

Note - if already attacking a target, this toggles auto-attack off --Goldark 17:01, 12 Jan 2005 (EST)

AttackTarget();

Arguments
none

Returns
nil

Example
AttackTarget();
Result

Description
Attacks the players selected target.

This is actually a toggle. If not currently attacking, it will initiate attack. If currently attacking, it will stop attacking.

If you need a way to always engage auto-attack, rather than toggle it on or off, one workaround I've used is AssistUnit("player"); this will always attack if you have "Attack on assist" checked in the Advanced tab of the Interface Options panel. (Although, I should add that I've had trouble mixing this with TargetNearestEnemy() in the same macro - the "Assist" target info isn't updated fast enough I guess) -- JamesNeko 07:03, 4 Mar 2006 (EST)


Template:WoW API