![]() |
The API is no longer being updated here until further notice. |
Registers the frame for a specific event, triggering only for the specified units.
registered = Frame:RegisterUnitEvent(eventName [, unit1, ...])
Arguments[]
Returns[]
- registered
- boolean
Details[]
- Repeated calls will overwrite old registrations. Calling Frame:RegisterEvent will also overwrite the old registration.
- If no unit is given, then all units will be watched; which is virtually the same as calling
Frame:RegisterEvent.
Example[]
local function OnEvent(self, event, ...)
print(event, ...)
end
local f = CreateFrame("Frame")
f:RegisterUnitEvent("UNIT_HEALTH", "player", "party1", "party2", "party3")
f:SetScript("OnEvent", OnEvent)
Patch changes[]
Patch 5.0.4 (2012-08-28): Added.
