I got
frame with
self.A = 1,
self.B = 2 and so on... parameters.
In this frame i trigger
function X(self) when
PLAYER_ENTERING_WORLD.
Code:
<Frame>
<Scripts>
<OnLoad>
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self.A = 1
self.B = 2
</OnLoad>
<OnEvent>
self:UnregisterEvent("PLAYER_ENTERING_WORLD")
X(self)
</OnEvent>
</Scripts>
</Frame>
Lua Code:
function X(self)
print(self.A, self.B...) -- output 1 and 2 and so on paraetrs...
end
And i got
function Y() that trigger when custom
Button pressed.
Code:
<Button>
<Scripts>
<OnLoad>
self.Z = true
</OnLoad>
<OnClick>
Y()
</OnClick>
</Scripts>
</Button>
Lua Code:
function Y()
if self.Z == true then
-- Then i want to trigger function X(self) with it's frame self.A = 1, self.B = 2... parameters
end
end
What is want, is to trigger frame function X(self) with
self.A = 1,
self.B = 2 parameters with function Y() or after Button pressed.
Will appreciate your help.