Ok, I've created a button to do a should-be-simple task: target a unit.
The problem is, I cant figure out how to target a unit thats derived from a saved variable or local (ill explain in a second).
(for the following, im trying to target a guy named Lar in Sen'jin Village)
It works if the target is built into the macro, such as this:
Code:
self:SetAttribute("type1", "macro")
self:SetAttribute("macrotext", "/target Lar")
It dosnt work though if the target comes from a local:
(SUPERTARGET is used for a lack of a better name atm)
Code:
local SUPERTARGET = "Lar";
self:SetAttribute("type1", "macro")
self:SetAttribute("macrotext", "/target" ..SUPERTARGET)
I tried it with a different attribute type, but that didnt work either:
Code:
local SUPERTARGET = "Lar";
self:SetAttribute("type", "target")
self:SetAttribute("unit", "Lar")
So, does anybody have any idea on how to get this to work?