Originally Posted by Garkin
Even default ZO_SavedVars allows access to saved variables of the different character - using the GetInterfaceForCharacter method.
However it is more suitable for copying settings from one character to another. It will not help you with iterating over the existing account/character names stored in the table and you will need keep list of chracters somewhere (probably in account wide settings).
|
Nice, learned something new. Didn't know about that one.
But you made me think, so I will also add, in case he wanted/needed to iterate the table without keeping a list of character names, he could do something like this:
Lua Code:
local tAccountData = _G["MySavedVarsGlobalTable"]["Default"]["@displayName"]
for sCharName, tCharSavedVars in pairs(tAccountData) do
if sCharName ~= "$AccountWide" then
-- tCharSavedVars = character saved var table for sCharName, do whatever with it
end
end