WoWInterface (
-   Lua/XML Help (
-   -   Screenshot timing issues (

yoshimo 05-09-16 01:12 AM

Screenshot timing issues
Having a screenshot taken automatically if achievements or their criteria are earned seems rather easy if you tie the screenshot function to the event.
What i do not understand is how you make sure that the achievement frame is neither still flashing golden and has no text and no icon in it nor that it has already began to fade out.
To me it seems that it is depending on the speed of the computer of its components and the amount of addons loaded, isn't it?
Having a static delay of a second also doesn't seem to be a good choice either.

SDPhantom 05-09-16 01:48 AM

If you hook the right functions, you can get the screenshot to activate perfectly each time.

Lua Code:
  1. local Hooked={};
  2. local function OnFinished() RunBinding("SCREENSHOT"); end
  4. hooksecurefunc("AchievementAlertFrame_SetUp",function(frame)
  5.     if not Hooked[frame] then
  6.         if frame.glow then frame.glow.supressGlow=true; end
  7.         frame.animIn:HookScript("OnFinished",OnFinished);
  8.         Hooked[frame]=true;
  9.     end
  10. end);

This catches when a dynamic achievement alert frame is shown and hooks the animIn animation to take a screenshot when it finishes fading in. This also tells the frames to suppress the glow animation so it doesn't interfere.

Hiketeia 05-14-16 05:51 PM

Pretty! I used to use 'Multishot' addon but it broke a while back. Thanks for sharing.

All times are GMT -6. The time now is 11:05 PM.

vBulletin © 2021, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI