Ok, thx for that! I see where we are going to.
But the funny thing is.... i even used the meantioned function before, but no difference.
Lua Code:
LowPop = LowPop or {}
local lp = LowPop
lp.name = "LowPop"
--/script d(GetSecondsUntilCampaignEnd(GetAssignedCampaignId()))
----------------------------------------------------------------------------------------------------
function lp.addonLoaded(event, addonName)
if addonName ~= lp.name then return end
EVENT_MANAGER:UnregisterForEvent(lp.name, EVENT_ADD_ON_LOADED)
QueryCampaignSelectionData()
--QueryCampaignLeaderboardData()
EVENT_MANAGER:RegisterForUpdate("LowPop_Update", 10000, function()
--QueryCampaignSelectionData()
d("|c00FF00 ### TEST GetSecondsUntilCampaignEnd: |r"..tostring(GetSecondsUntilCampaignEnd(GetAssignedCampaignId())))
end)
end
----------------------------------------------------------------------------------------------------
EVENT_MANAGER:RegisterForEvent(lp.name, EVENT_ADD_ON_LOADED, lp.addonLoaded)
Returns "0" until "campaigns" opened. Anyone an idea why?
BTW:
What i had in mind is an addon to show when the LowPop Bonus gets enabled in Cyro. The above code is just cutted down to figure out whats going on. I used the given EVENT and not a generell 10sec timer to update. Thats just for testing!
Also changed
isLowPopEnabled to the
campaignEnds thing to be able to test. Was annoying in the beginning to wait until a real LowPop was enabled while spamming that L button
Also on the PTS is doesnt seem to work at all.
!!! If that helps, i can
not publish that addon after figuring out, but just use myself and also can delete this post or blank out. So it will not "sum up" but is really just one call