ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   EVENT_ZONE_CHANGED or UPDATE assistance (https://www.esoui.com/forums/showthread.php?t=10498)

sinnereso 03/22/23 12:11 PM

EVENT_ZONE_CHANGED or UPDATE assistance
 
I have a few questions regarding the EVENT_ZONE_UPDATE event.

Im registering it when accepting the queue entering cyrodiil with the following and everything looks ok off the start:

Code:

EVENT_MANAGER:RegisterForEvent("MyAddon", EVENT_ZONE_UPDATE, MyAddon.QueueHourGlass)

But... upon entering cyrodiil it doesnt appear the "MyAddon.QueueHourGlass" function listed below was fired. It did once randomly but have bene unable to reproduce it again.

Code:

EVENT_MANAGER:UnregisterForEvent("MyAddon", EVENT_ZONE_UPDATE)

Is there a delay required before running it? The fact or worked once randomly suggests a timing thing to me. I also tried the EVENT_ZONE_CHANGED actually 1st and that was the one that worked once randomly.

*EDIT*
Nevermind think i found it with On_player_activate from another post but if anyone else has any oother suggestions to avoid on_player_update im interested. I'd prefer to use that function as little as possible for performance reasons.

ExoY 03/22/23 01:31 PM

What are you trying to do in the first place?

Baertram 03/22/23 02:02 PM

https://www.esoui.com/forums/showthread.php?t=10487

sinnereso 03/23/23 03:26 AM

Quote:

Originally Posted by ExoY (Post 47456)
What are you trying to do in the first place?

I was trying to display my little onscreen message and orobouros animation while it was loading into campaigns and then hide it upon entering campaigns. It just wasn't hiding it once I got there with EVENT_ZONE_CHANGED or UPDATE. It did only once for an unexplained reason.

It does however work perfectly if I shut it down via on_player_activate. I just prefer not using that function unless theres no other way because it fires alot and may affect zoning performance. Technically I still have a possible bug though with this setup as if someone declines entering campaign it may stay on the screen.

ExoY 03/23/23 06:04 AM

I can tell you with almost absolut certainty, it will not Impact Performance with the
Player activated event.

In fact that event isnt even called that often compared to other events.


All times are GMT -6. The time now is 06:36 AM.

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