1. #1

    kgPanels Script unit frames

    I would like to show a panel depending on what boss is targeted.

    Something like: If boss1 and target are the same, then show.

    Is this an event? Can it be done by OnUpdate?

    Think it needs to use unitisunit.

    Frame has to be hidden on load.

    EDIT: I've got this working ish.

    Thing is, usually ppl target the boss before the encounter start, so the Boss frames aren't displayed yet, this means that if I target the boss before the encounter starts, the panel won't be displayed until I change target then back to the boss.

    This is how I've done it:

    Code:
    OnLoad
    self:RegisterEvent("PLAYER_TARGET_CHANGED")
    
    OnEvent
    if UnitIsUnit("boss1","target") then
    self:Show()
    else
    self:Hide()
    end
    I need a better way of updating the panel
    Last edited by Pincho93; 2016-09-27 at 03:46 PM.
    Zynage - Ret Paladin Sylvanas-EU - Abeir Toril

  2. #2
    In the OnLoad, add the ENCOUNTER_START event. That will update the panel when a boss is aggroed and the boss frames show.
    Originally Posted by Zarhym (Blue Tracker)
    this thread is a waste of internet

  3. #3
    Thanks, will give it a try.

    EDIT: Tested it out, and still need to change target for it to update. Think that the frames are sometimes displayed after or before I enter combat.
    Last edited by Pincho93; 2016-09-27 at 06:59 PM.
    Zynage - Ret Paladin Sylvanas-EU - Abeir Toril

Posting Permissions

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