Thread: Compass Events
View Single Post
08/02/14, 04:59 PM   #26
unLeashed3k
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 33
Originally Posted by Garkin View Post
This won't help. ZO_CompassContainer:GetAlphaCoefficients(pinType) method can tell you what is alpha coefficient for given pinType, but nothing else.

But as pins are created on compass, there should be way to get information about those pins at the time when they are created. I'd try to check if there is some event which can be used. I'm not in game right now, so I can't test it, but my guess is this event:

EVENT_PLAYER_IN_PIN_AREA_CHANGED (*integer* _pinType_, *integer* _param1_, *integer* _param2_, *integer* _param3_, *bool* _playerIsInside_)
I played around with that for a few hours with no results (that I was looking for). It seems to fire when your compass turns blue because you entered a quest_objective area.

Edit: Unfortunately all my attempts would fail even if I could do what I wanted to, because COMPASS.container (ZO_Compasscontainer) keeps getting more elements as I move around (new markers are added) in the world but elements that are no longer visible on the compass remain. So, while I could collect information and assign it an ID within my own table I'll never be able to remove an element (again from my own table) because COMPASS.container never forgets an element it has seen.

Terribly sorry if I'm explaining this wrong but a simple example is when I enter the world and run a script to GetNumChildren() from COMPASS.container it will show I have 67 children attached to that control (apparently I call them "elements" above ha!) and then move a few meters until a Quest Offer NPC shows on the COMPASS.container (doesn't matter where; can be on the left, right, or anywhere in between) the function call GetNumChildren() will now output 68. Victory! It does exist somewhere! ...but if I move back exactly (180 degree) the way I came until the markers fades (not visible anymore on the compass) GetNumChildren will still output 68.

So as I was saying, if GetNumChildren() never decreases while moving through the world then, even if I could get the information I wanted, I would still need to know it no longer is available information. Thus the title of my thread "Compass Events" =)

Last edited by unLeashed3k : 08/02/14 at 05:20 PM.
  Reply With Quote