WoW:Using OnUpdate correctly: Difference between revisions

Line 1: Line 1:
= How often is it called =
= How often is it called =
The game engine will call your OnUpdate function approximately every 0.1 seconds (as defined by the UPDATE_DELAY [[WoW Constants]]).  This is usually more often then necessary, and executing your code so often will cause lag!  What you need to do is limit how often your OnUpdate code runs, strategies are outlined bellow.
The game engine will call your OnUpdate function once each frame.  This is (in most cases) extremely excessive.


= When is it called =
= When is it called =
Anonymous user