• 0

    posted a message on UnitFrames AddOn
    Need help with a lua script that I can't get to work. I want to move my target frame, player frame, focus frame and focus/target ToT frame, with a lua script so I dont have to do it everytime I make a new character, and without using an official addon. This is the script that I have made, but it isn't working, can anyone help?

    -- This file is loaded from "TargetFrames.toc"
    
    local f = CreateFrame("Frame")
    f:RegisterEvent("PLAYER_LOGIN")
    f:SetScript("OnEvent",function(self,event,...)
    
    PlayerFrame:ClearAllPoints()
    PlayerFrame:SetPoint("LEFT",540,100)
    
    TargetFrame:ClearAllPoints()
    TargetFrame:SetPoint("LEFT",1060,100)
    
    FocusFrame:ClearAllPoints()
    FocusFrame:SetPoint("LEFT",340,40)
    
    FocusFrameToT:ClearAllPoints()
    FocusFrameToT:SetPoint("LEFT",130,-47)
    
    TargetFrameToT:ClearAllPoints()
    TargetFrameToT:SetPoint("LEFT",133,-48)
    
    PlayerFrame:SetUserPlaced(true)
    
    TargetFrame:SetUserPlaced(true)
    
    FocusFrame:SetUserPlaced(true)
    
    FocusFrameToT:SetUserPlaced(true)
    
    TargetFrameToT:SetUserPlaced(true)
    
    
    self:UnregisterEvent("PLAYER_LOGIN")
    
    
    end)
    Posted in: Need Help?
  • To post a comment, please or register a new account.