1. Hi, im trying to create a single clickable frame with the bg target. I already make some working comunication with ace3 lib :

    Select Target and send it to raid:

    BgCallTarget = LibStub("AceAddon-3.0"):NewAddon("BgCallTarget", "AceComm-3.0") BgCallTargetConsole = LibStub("AceConsole-3.0")

    function BgCallTargetConsole:CallTarget(input) local x, y = GetPlayerMapPosition("player") BgCallTarget:SendCommMessage("callTarget", "" ..UnitName("target"), "RAID") BgCallTargetConsole:Print("BGCallTarget - Target sent! ") end

    BgCallTargetConsole:RegisterChatCommand("callTarget", "CallTarget")

    Listen for new targets:

    BgGetTarget = LibStub("AceAddon-3.0"):NewAddon("BgGetTarget", "AceComm-3.0")

    function BgGetTarget:OnCommReceived(prefix, message, distribution, sender) BgCallTargetConsole:Print("New target: " ..message) end

    BgGetTarget:RegisterComm("callTarget")

    But i have no clue on how to create the clickable frame with the new target. I've tried a lot of samples but no one done it. I know, its a noob question but im new to wow programing.

  2. You cannot do it if you are in combat, so if that's your goal...

  3. I can't send the msg's while in combat?

  4. You can send the messages, you cannot create a frame that will allow you to click on it.

  5. Hummm... I may have to change the context. It would be possible to create the frames of all players on the opposing team as BattleGroundTargets and through mgs leave the target button highlighted?

  6. Yes, you can always change display (with the exception of size and visibility) based on the current situation, you just can't have 'contextual' buttons, basically.

  7. Thx a lot! I'll try to use bgt addon as base to my addon.

  8. Essentially, you want to loop through all players on the opposing team using the scoreboard API (most importantly GetBattlefieldScore) and create a frame with a /targetexact macrotext attribute for every opponent. Then have code that handles targets joining/leaving the BG and repositions frames accordingly, and make sure you make any target changes in combat merely queue a repositioning on PLAYER_REGEN_ENABLED.

  9. Exactly, that's what Battleground targets already do. I want to use it as base, and trough addonMessages i want to tell other playes who they should attack highlighting the the target name on their screen.