WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   How to detect how many enemies are around your current player (https://www.wowinterface.com/forums/showthread.php?t=57777)

Damply 01-14-20 09:28 PM

How to detect how many enemies are around your current player
 
I've been trying to create my own rotation addon just like hekili and its going okay but my only issue is aoe, how do i go about finding out how many enemies are around my player?

Xrystal 01-15-20 06:20 PM

Quote:

Originally Posted by Damply (Post 334965)
I've been trying to create my own rotation addon just like hekili and its going okay but my only issue is aoe, how do i go about finding out how many enemies are around my player?

I don't think you can. There are only unit options. target, focus etc .. you will have target and set it as focus, or target for it to be the target. I haven't seen a function that identifies mobs around you. Probably because its a step closer to automation .. just have left click for single target and right click for aoe and have the rotation tool just highlight the button that has the appropriate single/aoe ability.

Damply 01-15-20 07:48 PM

Quote:

Originally Posted by Xrystal (Post 334969)
I don't think you can. There are only unit options. target, focus etc .. you will have target and set it as focus, or target for it to be the target. I haven't seen a function that identifies mobs around you. Probably because its a step closer to automation .. just have left click for single target and right click for aoe and have the rotation tool just highlight the button that has the appropriate single/aoe ability.

So theres no way to count them? Maybe try to read combat log and see how many are attacking you? Dont need names just if theres a certain number

Xrystal 01-15-20 10:01 PM

Quote:

Originally Posted by Damply (Post 334970)
So theres no way to count them? Maybe try to read combat log and see how many are attacking you? Dont need names just if theres a certain number

You could try to see who is attacking you but aoe range doesn't mean they are attacking you, just means they are in range of your spells.

Unfortunately I haven't played with the combat log much and definitely not the new way of doing things. You will have to test the functionality yourself. Look at an addon that access the combat log in recent times and test it out with some low powered mobs that won't kill you while you test it out. Or look at an existing rotation helper and see if that does something similar.

How much you will be able to do UI wise once combat starts I don't know but rotation helpers do seem to work during combat, so it may be just how they find the information out. They may be ignoring the combat log and relying on cooldowns and auras on you or the target.

JDoubleU00 01-16-20 04:29 PM

Have you looked at the code in Hekili? They can display an AOE rotation.

Damply 01-16-20 05:09 PM

Quote:

Originally Posted by JDoubleU00 (Post 334981)
Have you looked at the code in Hekili? They can display an AOE rotation.

I have, i could not see where it handles the logic for it.

Kanegasi 01-16-20 05:55 PM

Hekili explains what they do to track melee enemies in the settings. It's a heuristic process that combines nameplate counting and a timer of damage. If a melee ability hits an enemy, that enemy's guid is counted for a few seconds. If you don't hit it again and its nameplate can't be found, or it records that unit's death in the combat log, it drops the enemy.

Damply 01-17-20 01:50 AM

Quote:

Originally Posted by Kanegasi (Post 334984)
Hekili explains what they do to track melee enemies in the settings. It's a heuristic process that combines nameplate counting and a timer of damage. If a melee ability hits an enemy, that enemy's guid is counted for a few seconds. If you don't hit it again and its nameplate can't be found, or it records that unit's death in the combat log, it drops the enemy.

Wow i'll have to keep looking to find where its doing this, thats pretty smart. Thanks for the info, this might work for what im doing.


All times are GMT -6. The time now is 03:54 AM.

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