This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Targetting macro
Post Reply
Return to board index
Post by
95008
This post was from a user who has deleted their account.
Post by
Tildy
I don't know of a non /script way to check if a unit is a unit.. like the UnitIsUnit() function.
You could switch between two targets every button press using /targetlasttarget in conjunction with the /target and /focus stuff you're already using, but I don't know a way to
always
keep the same one of those targets your focus target.
Post by
95008
This post was from a user who has deleted their account.
Post by
Stagen
I'd say you take a long and good look at the
Macro Collection @ Wowwiki.com
and especially take notice to the mage's
Polymorph part
. It pretty much has the basics for all forms of CC management though macros, it usually just takes a bit of adjusting and changing spell names out.
Post by
95008
This post was from a user who has deleted their account.
Post by
Stagen
That is actually what got me started writing this macro. Unfortunately there is nothing in that macro that does what I am looking to do. I need to be able to determine if my current target is also my focused target. From what I have seen it may not be possible.
While Blizzard were smart enough to add the focus ability to the game, they weren't smart enough to make specific unit frames for it. If you play with the generic game unit frames you should see a yellow glow around the focus target while you actually have it targeted. However, if you target someone else, you won't be able to see what your focus target is, if it's being damaged or it's actually dead. Can be quite confusing indeed.
However, there's Unit Frame addons with the ability to constantly display your Focus target on the screen, exactly like if it was your actual target. I don't know all the different unit frame addons but I use the Ace2
Pitbull
addon myself which is probably the most detailed and advanced (if you make it so) unit frame addon to date. This addon will display your focus target, the Focus' target's target just like any ordinary target would be shown. You should check it out. I hope it helps, I'll be monitoring this thread. =)
Post by
Tildy
I don't know of a non /script way to check if a unit is a unit.. like the UnitIsUnit() function.
You could switch between two targets every button press using /targetlasttarget in conjunction with the /target and /focus stuff you're already using, but I don't know a way to
always
keep the same one of those targets your focus target.
Is there a conditional that would tell me if my current target is set as my focus or not?
I think I could make it work if I could figure out how to to test for that.
No, there is not ;]
That's what I was trying to express in my initial post when I said 'there is no way to check if a unit is a unit' and referenced the lua function that does just that.
As I said, if you don't specifically care whether the focus remains on the same one of the two targets, you can make a macro that when pressed switches between two targets without much trouble.
Post by
95008
This post was from a user who has deleted their account.
Post by
Tildy
I'll look into the UnitIsUnit() function then. Do you happen to know if Blizzard still permits targetting and such via /script within macros? From what I have gathered Blizzard removed a lot of the old functionality of /script when used inside of macros.Oops, I meant to talk about that in the post.
You can't use protected functions in your macro scripts:
http://www.wowwiki.com/Category:World_of_Warcraft_API/Protected_Functions
Included there are the target-related functions like TargetUnit. Mostly they protect functions that interact with the 3D game world in some fashion.
If you wanted to use modifiers you could do something like: targetlasttarget if modifier, else target focus. I don't completely understand what you want to do, but that would allow for switching to either your focus or to your last target pretty easily with the same button.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.