Thread: rmod Layouts
View Single Post
Old 03/16/08, 2:38 AM   #48 (permalink)
 sadris
"If its not the best then its wrong"
 
sadris's Avatar
 
Tauren Druid
 
Mal'Ganis
What is with the core.lua:initObject function? I placed a object:SetScript("OnUpdate", PvpUpdate) in it where PvpUpdate is defined as:
  local PvPUpdate = function(self, a1)
  	time = time + a1
  	
  	if(time > 1.5) then
  		self:UpdatePVP()
  		time = 0
  	end
  end
Yet the UpdatePVP function is never called. Similarly, I inserted UNIT_FACTION = "UpdatePVP", into the events table and object:RegisterEvent"UNIT_FACTION" into the initObject function and still, the UpdatePVP function is never called. Judging from the Spawn function, initObject is called for all non-raid unit frames, so what am I missing?

In a nutshell, how can I add a new event to the unit frames and how can I get a generic OnUpdate to work?
 
User is offline.
Reply With Quote