View Single Post
07/13/19, 03:12 AM   #1
shAndrew
Join Date: Nov 2014
Posts: 3
Distance in units to an enemy NPS?

HI all.
I what to implement a simple helper add-on for myself that will do the following:
if player in combat - it finds all enemies and places a marker on them (will try to place the same method as it is implemented in Harvest Map) with a specified color. Color will be changed depending on abilities I have on my bar. For example I have 3 dmg abilities on my bar. all 3 with different range (20, 8, 3). Set marker or pin with color red on enemy if he's in range of ability1 with range 20. Update pin if enemy in range of ability2 and ability3.
In order to achieve that I need the following:
1. Ability range value. - I believe GetAbilityRange(abilityId) gives me what I need.
2. At least enemies position list. From that data I can figure out the distance using simple vector2 distance calculation formula.
3. Place a pin on it.
So my questions are:
1. Is it even possible to get Enemy position? If not - how this can be achieved in other ways?
2. I think I'll manage to figure out how Harvest Map addon places its pins, but would be appreciated if anyone explain how to place such pins

Thanks.
  Reply With Quote