Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
m (Added Parens)
(One intermediate revision by one other user not shown)
Line 1: Line 1:
  +
{{wowapi}} __NOTOC__
<center>'''SpellIsTargeting''' ''-Documentation by [[user:Caedric|Caedric]]-''</center>
 
   
Checks whether a spell has been cast and is waiting for a target.
+
Checks whether a spell is about to be cast, waiting for a target.
   
SpellIsTargeting()
+
isTargeting = SpellIsTargeting();
   
  +
== Parameters ==
----
 
;''Arguments''
+
=== Arguments ===
   
 
:''none''
 
:''none''
   
 
=== Returns ===
----
 
;''Returns''
 
   
 
:;isTargeting : [[Boolean]] - true if a spell has been cast and is waiting for a target; false otherwise
:Boolean istargeting
 
  +
:;istargeting : true if a spell has been cast and is waiting for a target; false otherwise
 
 
== Example ==
   
----
 
;''Example''
 
 
CastSpellByName("Purify")
 
CastSpellByName("Purify")
 
if (SpellIsTargeting()) then
 
if (SpellIsTargeting()) then
Line 23: Line 21:
 
end
 
end
   
;''Result''
+
=== Result ===
   
 
Casts Purify on the current target, if possible; otherwise, casts on the casting player.
 
Casts Purify on the current target, if possible; otherwise, casts on the casting player.
  +
No longer work as of [[2.0.1]]
 
----
 
{{Template:WoW API}}
 

Revision as of 09:09, 13 December 2006

Checks whether a spell is about to be cast, waiting for a target.

isTargeting = SpellIsTargeting();

Parameters

Arguments

none

Returns

isTargeting
Boolean - true if a spell has been cast and is waiting for a target; false otherwise

Example

CastSpellByName("Purify")
if (SpellIsTargeting()) then
  SpellTargetUnit("player")
end

Result

Casts Purify on the current target, if possible; otherwise, casts on the casting player. No longer work as of 2.0.1