Thread Tools Display Modes
03/18/23, 10:08 AM   #1
Shuba00
 
Shuba00's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2023
Posts: 18
Detecting event

Hello,

i was wondering if there is any event manager that fires with these 2 events:

UNIT_REMOVED


UNIT_ADDED


ty in advance
  Reply With Quote
03/18/23, 10:40 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,960
Moved to the correct forum

Answer:
If you check the API documentation txt files linked at the API version at the WIki you will find all events (search for EVENT_) and a list of EVENT_UNIT* in it.

EVENT_UNIT_CREATED
EVENT_UNIT_DESTROYED


Wiki:
https://wiki.esoui.com/Main_Page

API versions:
https://wiki.esoui.com/APIVersion

Check the entry at the current "live" version: "API TXT Documentation"

You can also have a look at the Wiki's Event list but it maybe not up2date! So be carefull with that event list and compar to the most current API version txt file contents!!!
https://wiki.esoui.com/Events

Last edited by Baertram : 03/18/23 at 10:45 AM.
  Reply With Quote
03/18/23, 12:41 PM   #3
Shuba00
 
Shuba00's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2023
Posts: 18
Originally Posted by Baertram View Post
Moved to the correct forum

Answer:
If you check the API documentation txt files linked at the API version at the WIki you will find all events (search for EVENT_) and a list of EVENT_UNIT* in it.

EVENT_UNIT_CREATED
EVENT_UNIT_DESTROYED


Wiki:
https://wiki.esoui.com/Main_Page

API versions:
https://wiki.esoui.com/APIVersion

Check the entry at the current "live" version: "API TXT Documentation"

You can also have a look at the Wiki's Event list but it maybe not up2date! So be carefull with that event list and compar to the most current API version txt file contents!!!
https://wiki.esoui.com/Events
Ty again man, always right
  Reply With Quote
03/21/23, 01:04 PM   #4
Shuba00
 
Shuba00's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2023
Posts: 18
Originally Posted by Baertram View Post
Moved to the correct forum

Answer:
If you check the API documentation txt files linked at the API version at the WIki you will find all events (search for EVENT_) and a list of EVENT_UNIT* in it.

EVENT_UNIT_CREATED
EVENT_UNIT_DESTROYED


Wiki:
https://wiki.esoui.com/Main_Page

API versions:
https://wiki.esoui.com/APIVersion

Check the entry at the current "live" version: "API TXT Documentation"

You can also have a look at the Wiki's Event list but it maybe not up2date! So be carefull with that event list and compar to the most current API version txt file contents!!!
https://wiki.esoui.com/Events
hey again, was trying to track spawn event in maelstorm, but with
EVENT_UNIT_CREATED i can't track it, do you have any suggestion?
  Reply With Quote
03/21/23, 02:14 PM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,960
No sorry, maybe someone else got info about this.

Afaik there is nothing to do such as the game does not provide information about "ungrouped" units, unless you move the mouse cursor (reticle) above them.
  Reply With Quote
03/21/23, 02:47 PM   #6
ExoY
 
ExoY's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 88
Afaik those two events have something to do when the player summons pets (maybe also assistants and such)

There is no specific event for unit spawns as you described.

Sometimes a EVENT_COMBAT_EVENT is triggered, indicating a unit spawn.
I think there is a more generic id used in multiple cases and it can also be case specific e.g. abomination spawns in RG.

However those are situation where adds are summoned within a fight. I dont know how it is done in Maelstrom. You can record events during a spawn using zgoo or torchbug and check, if there is any other event triggered.

Anyhow this would need a case to case investigation anyways.

Afaik maelstrom spawns are triggered by the death of certain units, so you can track those deaths if you get a little creative.
  Reply With Quote
03/21/23, 05:52 PM   #7
Shuba00
 
Shuba00's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2023
Posts: 18
Originally Posted by ExoY View Post
Afaik those two events have something to do when the player summons pets (maybe also assistants and such)

There is no specific event for unit spawns as you described.

Sometimes a EVENT_COMBAT_EVENT is triggered, indicating a unit spawn.
I think there is a more generic id used in multiple cases and it can also be case specific e.g. abomination spawns in RG.

However those are situation where adds are summoned within a fight. I dont know how it is done in Maelstrom. You can record events during a spawn using zgoo or torchbug and check, if there is any other event triggered.

Anyhow this would need a case to case investigation anyways.

Afaik maelstrom spawns are triggered by the death of certain units, so you can track those deaths if you get a little creative.
I can track when an enemy of the wave die, but i wanted to track when a certain unit spawn, like troll in fifth arena. Gonna try somethings
  Reply With Quote
03/22/23, 01:56 PM   #8
ExoY
 
ExoY's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 88
I haven't been in maelstroms for ages.
The way I understood the mechanics is that the death of certain units trigger the spawn of the next wave.
  Reply With Quote
03/22/23, 05:28 PM   #9
Shuba00
 
Shuba00's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2023
Posts: 18
Ok i found it finally, as u suggested to use zgoo, i scrolled every event stopping when unit spawned, and found out that i can track portal spawn with that eventManager:

EVENT_MANAGER:RegisterForEvent(Shuba.name .."spawn", EVENT_EFFECT_CHANGED, Shuba.CombatEvent)

finally did it, thanks all
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Detecting event

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