Quantcast
WoWInterface - View Single Post - Need help with spell activation overlay
View Single Post
12-09-20, 02:36 PM   #3
VeenixO
A Murloc Raider
Join Date: Dec 2020
Posts: 7
Originally Posted by Vrul View Post
You are referencing arg1 when it should be spellID and you are checking the wrong events. Give this a shot:
Lua Code:
  1. local SPELL_ID = 24275  -- Hammer of Wrath
  2.  
  3. local frame = CreateFrame("Frame")
  4. frame:SetScript("OnEvent", function(self, event, spellID)
  5.     if event == "SPELL_ACTIVATION_OVERLAY_GLOW_SHOW" then
  6.         if spellID == SPELL_ID then
  7.             print("Hello, WoW!")
  8.         end
  9.     elseif event == "SPELL_ACTIVATION_OVERLAY_GLOW_HIDE" then
  10.         if spellID == SPELL_ID then
  11.             print("Bye")
  12.         end
  13.     end
  14. end)
  15. frame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW")
  16. frame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE")
Seems to do the trick! Thank you ^^ Now just need to figure out how to make a texture appear but I'll try that on my own first ^^
  Reply With Quote