Plater Mod / Script

Hi,

I use the following to show 1, 2 and 3 over the enemy nameplates in arena via plater. Does anyone know how to change this to show A, S, D (Arena Enemy A = 1, S = 2, D = 3)?

function (self, unitId, unitFrame, envTable)
if (IsActiveBattlefieldArena()) then
if (unitFrame.ActorType == “enemyplayer”) then
for i = 1, 5 do
local unitGUID = UnitGUID (“arena” … i)
if (unitGUID == unitFrame.namePlateUnitGUID) then
unitFrame.unitName:SetText (i)
Plater:SetFontSize (unitFrame.unitName, envTable.FontSize)
end
end
end
end
end

function (self, unitId, unitFrame, envTable)
	if (IsActiveBattlefieldArena()) then
		if (unitFrame.ActorType == "enemyplayer") then
			for i = 1, 5 do
				local unitGUID = UnitGUID ("arena" .. i)
				if (unitGUID == unitFrame.namePlateUnitGUID) then
					unitFrame.unitName:SetText(i == 1 and "A" or i == 2 and "S" or i == 3 and "D" or i)
					Plater:SetFontSize (unitFrame.unitName, envTable.FontSize)
				end
			end
		end
	end
end

Literally have the answer to everything - thank you

1 Like