I don't know why i can't get this to work. I'm obviously don't understand it's usage. Can i get some insight on what i'm doing wrong here? From reading some tutorials it seems like this should work.
What i'm wanting to do is basically just execute the block of code based on when the production popup is opened/closed.
What i'm wanting to do is basically just execute the block of code based on when the production popup is opened/closed.
Code:
local ProductionPopup = ContextPtr:LookUpControl("/InGame/Popups/ProductionPopup");
if( ProductionPopup ~= nil ) then
print("PRODUCTION WINDOW IS OPEN")
else
print("PRODUCTION WINDOW IS -NOT- OPEN")
end