ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Check idle status? (https://www.esoui.com/forums/showthread.php?t=4503)

MBW91 03/28/15 06:29 AM

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

votan 03/28/15 10:41 AM

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.


All times are GMT -6. The time now is 08:41 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI