View Single Post
02/12/21, 12:24 PM   #7
Regretfulone
Join Date: Apr 2014
Posts: 6
Originally Posted by awfuldead View Post
what about add a condition to check if the player is alive?
So with LibCombat, I am using the FightSummary to parse the information. The problem is that if you die, all the enemies from the fight still come through and you can't get information about whether they were actually killed. I think Baertram's reply below is in line with what I was thinking where with the fight summary, I may need to check if each unit exists or not.

Originally Posted by Baertram View Post
I think he wanted to know if the critter is alive, not the player.
As there is no uniqueId for the critter and nothing after fight you could just check during fight what unitTags exist and also check if a unitTag gets destroyed -> should be the case as it will be killed.
EVENT_UNIT_DESTROYED (*string* _unitTag_)
-> Maybe not working for NPCs and critters, just group members and bosses .

* IsUnitDead(*string* _unitTag_)
** _Returns:_ *bool* _isDead_
GetUnitPower(CombatMechanicType)
+ the other GetUnit* and IsUnit* functions from the API txt documentation.

Maybe these only work with the unitTags you get from events and/or the "reticleover" where you need to move the crosshair above an enemy.

If these unitTags are not working for critters you might only be able to use events where there are _sourceUnitId_and _targetUnitId_ to identify the involved combatants.
Thanks for the input Baetram! I am thinking about how I might still be able to pull off the addon and this is definitely helpful! I was also thinking that it is likely that I will need to give people an option to create a 'blacklist' or an 'ignore' list so that they can ignore kills for silly things like Ice Barrier spell, unless they want to track that.

The other issue I foresee is that when citizens or npcs in a city become hostile and you kill them, that is also tracked. That is why I was hoping ESO offered a way to identify creatures that you can fight (alit, durzog, etc.).
  Reply With Quote