Thread Tools Display Modes
03/28/15, 06:29 AM   #1
MBW91
 
MBW91's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 5
Check idle status?

Hi there,

I have a simple question:
Is it possible to check if the player is in idle mode or not?


Greetings
Xerrok
  Reply With Quote
03/28/15, 10:41 AM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
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

ESOUI » Developer Discussions » Lua/XML Help » Check idle status?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off