Thread Tools Display Modes
03/22/23, 12:11 PM   #1
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 244
Question 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.

Last edited by sinnereso : 03/22/23 at 12:45 PM.
  Reply With Quote
03/22/23, 01:31 PM   #2
ExoY
 
ExoY's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 87
What are you trying to do in the first place?
  Reply With Quote
03/22/23, 02:02 PM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
https://www.esoui.com/forums/showthread.php?t=10487
  Reply With Quote
03/23/23, 03:26 AM   #4
sinnereso
AddOn Author - Click to view addons
Join Date: Oct 2022
Posts: 244
Originally Posted by ExoY View Post
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.

Last edited by sinnereso : 03/23/23 at 03:39 AM.
  Reply With Quote
03/23/23, 06:04 AM   #5
ExoY
 
ExoY's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 87
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.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » EVENT_ZONE_CHANGED or UPDATE assistance

Thread Tools
Display Modes

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