Quantcast Help simple addon - WoWInterface
Thread Tools Display Modes
10-19-17, 10:06 AM   #1
Samshad
A Defias Bandit
Join Date: Oct 2017
Posts: 3
Help simple addon

Hello,

I would like to create an addon that displays an image for a few seconds after the death of a boss, but I can not figure out how to display an image, can you help me? Thanks !
  Reply With Quote
10-19-17, 11:29 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 857
Lua Code:
  1. local frame = CreateFrame("Frame", nil, UIParent)
  2. frame:SetSize(20, 20)
  3. frame.Texture = frame:CreateTexture()
  4. frame.Texture:SetAllPoints()
  5. frame.Texture:SetTexture("Interface/Addons/YourAddon/YourImageFile")
  6. frame:SetPoint("CENTER")

frame:Show() or frame:Hide() to show/hide as required
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle and Move Pad Plus.
  Reply With Quote
10-19-17, 11:46 AM   #3
Kakjens
A Theradrim Guardian
Join Date: Apr 2017
Posts: 69
Some trivial suggestions:
1. Formalizing what you mean by "boss". Only raid bosses? Or dungeon bosses as well? What about faction leaders? Or some gnoll leader ir Redridge Mountains? There are cases when multiple boss-level enemies get defeated within one encounter. One example of such encounter is Iron Council in Ulduar, when bosses need to be defeated sequentially. There's also Illidari Council in Black Temple, where bosses share the same health. And there are bosses which need to be defeated within the same time window, like Conclave of Winds in Throne of the Four Winds.
2. So your task has three parts: understanding when to display (using WoW events), making a frame visible for some time(frame API (creation, changing their visibility) and timers), and changing displayed image of frame(frame API). But for all of that there will be need at least some knowledge of lua.
So I fear this simple add-on might require non-trivial amount of coding.
  Reply With Quote
10-19-17, 11:56 AM   #4
Samshad
A Defias Bandit
Join Date: Oct 2017
Posts: 3
Thanks Fizzlemizz The image has to be a .blp right ?
Kakjens, thanks for your answer, I already found the right wow event : ENCOUNTER_END
  Reply With Quote
10-19-17, 12:02 PM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 857
The image can be .blp or .tga. The edges must be a power of 2 in length (2, 4, 8, 16, 32, 64 etc.). It must have an alpha channel (ifyou use Gimp you can create an image with a transparent background and save to .tga using the default settings).
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle and Move Pad Plus.
  Reply With Quote
10-19-17, 12:10 PM   #6
Samshad
A Defias Bandit
Join Date: Oct 2017
Posts: 3
Thank you, it works perfectly!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Help simple addon

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off