Choose any addon's main lua file, search for the EVENT_ADD_ON_LOADED line.
At this event the game loads this addon and changing the actionabr or other controls before might bring an error.
It will look like this e.g.
Code:
EVENT_MANAGER:RegisterForEvent("NameOfAddonHere", EVENT_ADD_ON_LOADED, functionName)
functionName is either a name of a callback function used in that addon OR it is defined there directly as anonymous fucntion like this
Code:
function(eventId, addOnName)
--something is done here
end
Inside that functionName function the code of the addon will be executed as the addon loads.
It normally starts with something like a comparison of the addon name to the parameter "addOnName" of that function.
e.g.
Lua Code:
if "MyAddonName" ~= addOnName then return end
This is done as the event triggers for EACH active addon once! And only the current addon's call should be processed here in this addon file.
So at the end of that function functionName you can try to add that script, without the /script though as we are in a lua script already.
So your function functionName would look like this e.g. in the end:
Lua Code:
function MyAddon.OnEventAddonLoaded(eventId, addOnName)
if "MyAddonName" ~= addOnName then return end
--other code here
ZO_ActionBar1:SetScale(2)
end
or like this:
Lua Code:
local function OnEventAddonLoaded(eventId, addOnName)
if "MyAddonName" == addOnName then
--other code here
ZO_ActionBar1:SetScale(2)
end
end
or like this if it's an anonymous function directly in the EVENT_MANAGER:RegisterForEvent line:
Lua Code:
EVENT_MANAGER:RegisterForEvent("NameOfAddonHere", EVENT_ADD_ON_LOADED, function(eventId, addOnNam)
if "MyAddonName" == addOnName then
--other code here
ZO_ActionBar1:SetScale(2)
end
end)