1. #1

    Kg Panels Parentted Frame Lag. Help..

    I have parented frames for my Target, ToT, Focus and Focus Target's frames.
    But they all have like half a second of lag..

    Anyway to fix that?

    On Load: self:RegisterEvent("UNIT_TARGET")
    self:Hide()

    On Event: if UnitExists("target") == nil then
    self:Hide()
    return
    end
    local cl = UnitClassification("target")
    if (cl == "elite") or (cl == "worldboss") or (cl == "rareeleite") then
    self:SetBackdropColor(0.1, 0.1, 0.1, 0.1)
    self:Show()
    else
    self:SetBackdropColor(1, 1, 1, 1)
    self:Show()
    end


    Ect ect.

  2. #2
    Deleted
    Looks fine at first glance.

  3. #3
    Quote Originally Posted by Treeston View Post
    Looks fine at first glance.
    My question was in regards to wether it was normal to have a half second of lag when parenting Kg Panels to target frames and ect?
    And if not, how would I go about fixing it.

  4. #4
    Deleted
    Half second lag with what? Frame movement? Coloring (your script)?

  5. #5
    The frame showing up.
    Ie: Click on an enemy unit to create a target frame and then the background panel which was created in KG Panels only shows up a hafls second after the target OuF Frame has been created.

    ---------- Post added 2011-09-27 at 01:58 PM ----------

    Does that make sense?

  6. #6
    Deleted
    Use PLAYER_TARGET_CHANGED - it's possible that it's faster than UNIT_TARGET (it's more efficient even if it's not faster). Also, you don't have to do Hide/Show in your scripts if your panel is parented to the TargetFrame, as it will automatically hide/show along with it anyways.

    Code:
    self:RegisterEvent("PLAYER_TARGET_CHANGED")
    Code:
    if not UnitExists("target") then return end
    local cl = UnitClassification("target")
    if (cl == "elite") or (cl == "worldboss") or (cl == "rareeleite") then
        self:SetBackdropColor(0.1, 0.1, 0.1, 0.1)
    else
        self:SetBackdropColor(1, 1, 1, 1)
    end

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •