View Single Post
12-28-19, 07:11 PM   #1
BryanM42
A Defias Bandit
Join Date: Dec 2019
Posts: 3
Target of Target's name?

Currently, I have the following snippet of code that works perfectly and tells me what I want to know:

if UnitExists("target") and (UnitIsUnit("targettarget", "player") or UnitIsUnit("targettarget", "pet")) then

I'd like to add functionality that would also return true if the target of my target is a specific name (for example, "Vim Brineheart"). Is that a possibility? I tried using UnitName, but I must have messed up the code somewhere because it broke the originally working bit. Here's what I tried though:

if UnitExists("target") and (UnitIsUnit("targettarget", "player") or UnitIsUnit("targettarget", "pet") or UnitIsUnit(UnitName("targettarget", "Vim Brineheart"))) then
  Reply With Quote