Thread: Nameplates
View Single Post
07-26-12, 01:28 PM   #4
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Haleth View Post
You still need to use WorldFrame:GetChildren() to actually iterate through potential frames. Then you can check them by name.
Actually...
Lua Code:
  1. local index = 1
  2.  
  3. local addon = CreateFrame('Frame')
  4. addon:SetScript('OnUpdate', function()
  5.     while _G['NamePlate' .. index] do
  6.         local frame = _G['NamePlate' .. index]
  7.  
  8.         -- do whatever
  9.  
  10.         index = index + 1
  11.     end
  12. end)
  13. addon:Show()

Last edited by p3lim : 07-26-12 at 03:19 PM.