Hello,
I would like to create a small addon that overrides another addon in certain conditions, like that:
Code:
-- targetted addon code
function originalFcn(param1, param2)
print("original addon -"..param1.."-"..param2);
end
When this function is called in the targetted addon, i would like to this code in my addon:
Code:
-- my addon code
function myFcn(param1, param2)
if (myAddon_isOn) then -- my addon settings
-- hook
print("myaddon..param1..param2);
-- do not execute originalFcn() function!
else
-- don't do anything, let's the original code run
end;
end
Is it possible to do such thing? If yes, could you tell me how?
Thanks in advance.