Thread Tools Display Modes
01-08-06, 01:46 PM   #1
TheFungus
A Defias Bandit
Join Date: Jan 2006
Posts: 2
DART: Hiding/Showing and targetting

Ive searched this forum and cant quite find enough information to solve myproblem, appologies if someone has already been over this. In any case, it should be a quick answer.

Im trying to get a texture to show when I have a target selected, then hide when i have no target selected. Simple enough and I think Ive almost got it but its not quite working.

I have the texture registering the event PLAYER_TARGET_CHANGED and Ive tried several methods in the OnEvent including:

if target then
DART_Show(1);
else
DART_Hide(1);
end

So far this is the most responsive, the texure hides when my target changes but never comes back. The main problem is that I dont know how the target variable is saved or how i can call it.

I also couldnt find a function like GetPlayerTarget() in the WoW API site, that would make it too easy I guess.

Any help would be greatly appreciated.
  Reply With Quote
01-08-06, 02:16 PM   #2
BigTimeWeb
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
I think your basic problem is that you are using PLAYER_TARGET_CHANGED which results in the texure hides when my target changes but never comes back

I'm not a DART guru, but I think you'd need to do something more like

if arg1=="player" and UnitIsPlayer("target") and UnitisEnemy("player" , "target") then
  Reply With Quote
01-08-06, 02:20 PM   #3
TheFungus
A Defias Bandit
Join Date: Jan 2006
Posts: 2
Nevermind, problem solved

Thanks for the reply, however I solved the problem myself about 2 seconds after you posted. I was snooping around the mytargetmodel.xml and found a nifty little if statement:

if (UnitExists("target")) then

took care of all my problems, but again, thx for the response.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Released AddOns » DART: Hiding/Showing and targetting


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off