This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Classic Theme
Thottbot Theme
[@...] with NPCs
Post Reply
Return to board index
Post by
Squirl
This does not work:
/cast Throw
This does work:
/focus Training Dummy
/cast Throw
This does work:
/tar Training Dummy
/cast Throw
So, does the @ conditional just not work for NPCs? It seems to only work for players and frames. Does anyone know what the reasoning behind this would be?
Post by
HighFive
The @ conditional works when supplied with a UnitID or when the name you've given it is a raid (or group) member (or a raid (or group) member's pet(?)). I'm not sure why it's even possible, to be honest. In my eyes @name-ing is a pretty weird thing to do.
Post by
Neffi
@ doesn't explicitly support names at all. It's a consequence of the game engine recognizing player names in your party/raid as valid unitIDs.
See here for correct usage:
http://www.wowpedia.org/UnitId
I recommend using @mouseover for things like this,
/use
Casts Throw on your mouseover if it exists, is an enemy and is alive, otherwise on your target.
Or you can even do something like:
/use Throw
Which should attach the spell to your mouse (like when you click a buff), and then you can click on a unit to cast it. (At least that's how it should work, never tried it with non-buff spells.)
Post by
HighFive
Really? I've always thought of UnitIDs as an immutable set of strings.
There's also this:If you are using a party or raid member's name as a unit, you need to use hyphens to separate the target chain (e.g. "Cogwheel-target-target").(I didn't know this was possible, but I'm not gonna doubt Cogwheel) which makes it seem like they are treated separately.
Post by
Neffi
Nobody really knows how the client treats anything behind Lua. Because of the complex nature of unit interaction, I'm sure it became necessary to thunk unit names into unitIDs at some point anyway for the C-side code to function properly, so they made the decision to run Lua's unitIDs through those routines instead of directly to the routines which handle the unitID.
This is all just a guess, and maybe it is a special utility provided to Lua only. But even in this case, when you're using a party or raid member's name as a unitID, it is still considered to be a unitID internally and is not treated any differently from one.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.