I'm attempting to make an addon that lets you change a specific group members pin to make them more distinguishable. I used Votan's Map Pins as a base and from what I've gathered, you can access ZO_MapPin.PIN_DATA and filter by crown, group, and players. What I don't understand is there is a function for choosing a icon and tint, and I was able to customize it so a specific player could have a unique one. However, for size and level, I tried setting them to a function which acted similarly and I get errors (I'm assuming because those two fields only accept an integer that effects all pins of that category). So since it doesn't look like I can change the level and size through a similar means as texture and tint, how else can I change those two values on a per pin basis? Here is a sample of the relevant code:
Lua Code:
function addon.IconFromName(pin)
if not pin then return "" end
local unitTag = GetUnitTag(pin)
if not unitTag then return "" end
AddOverlayIcon(pin, unitTag)
local name = GetUnitDisplayName(unitTag)
local info = addon.account.name[name]
if info ~= nil then
return info.icon
end
return "/esoui/art/mappins/ui-worldmapgrouppip.dds"
end
local leader = ZO_MapPin.PIN_DATA[MAP_PIN_TYPE_GROUP_LEADER]
local group = ZO_MapPin.PIN_DATA[MAP_PIN_TYPE_GROUP]
leader.texture = addon.IconFromName
group.texture = addon.IconFromName
leader.tint = addon.TintFromName
group.tint = addon.TintFromName
group.size = addon.SizeFromName -- Doesn't work. Only accepts integers