CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on Setting Tracked Waypoint Not Working in Addon but works in /script

    Yes, I needed to give it a frame between the event firing and setting it as tracked.  Used the C_Timer.After function thanks to help in the Wow Addons discord.

    Posted in: Lua Code Discussion
  • 0

    posted a message on Setting Tracked Waypoint Not Working in Addon but works in /script

    So, I'm trying to track a way point when it's updated, but I can't get it to actually work in my addon.  If I use /script with C_SuperTrack.SetSuperTrackedUserWaypoint(true); it works fine, but in the lua files seems to not.  I have it inside an if block, but I know the block triggers because a print() will fire.  Any ideas? 

     

    local frame = CreateFrame("FRAME", "ATMP_frame");
    frame:RegisterEvent("USER_WAYPOINT_UPDATED");
    local function eventHandler(self, event, ...)
     if C_Map.HasUserWaypoint() == true then
        print("entered block");
        C_SuperTrack.SetSuperTrackedUserWaypoint(true);
     end
    end
    frame:SetScript("OnEvent", eventHandler);
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.