View Single Post
03/28/15, 10:41 AM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 578
I did not found any direct event for being "idle".
But you can try to track the absence of non-idle events using EVENT_MANAGER:RegisterForAllEvents
All you have to do is to find out all event-codes not affecting your idleness.
Once your timer thinks you are idle due to not getting non-idle events double check it with:
idle = SCENE_MANAGER:IsShowing("hud") and not IsUnitDead("player") and IsGameCameraActive() and not (IsPlayerMoving() or IsUnitInCombat("player") or IsInteractionCameraActive())

I currently do a PoC.
  Reply With Quote