Thread Tools Display Modes
05/02/14, 10:26 PM   #1
mikethecoder4
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 13
Detect when you've taken a keep

So I want to detect when you've taken a keep. This is dissimilar from some addons that show you when a keep has been taken. I want to detect specifically when you have taken a keep (IE your on the flag. Basically if you have the Countinuous assault passive from the assault tree, whenever you get that buff I want to detect.)

Right now I have registered the OBJECTIVE_CONTROL_STATE event, and have figured out what some of the parameters mean.

my function looks like so atm (mostly a debug function)

Code:
function SC_G.ObjectiveControlState(self, objectiveKeepId, objectiveObjectiveId, battlegroundContext, objectiveName, objectiveType, objectiveControlEvent, objectiveControlState, objectiveParam1, objectiveParam2)

	if objectiveControlEvent == OBJECTIVE_CONTROL_EVENT_CAPTURED or objectiveControlEvent == OBJECTIVE_CONTROL_EVENT_RECAPTURED  then 
d("keep captured")
		d(objectiveKeepId, objectiveObjectiveId, objectiveName,battlegroundContext, objectiveType, "removed control state and event", objectiveParam1, objectiveParam2)
	end
end
I still have no clue what battlegroundContext and objectiveParam2 mean. I have pretty much figured out the rest. This function seems to fire whenever a keep is changed. Is there any way to also detect if you were there when the keep was taken. objectiveParam2 seems to always be 0, and battleGroundContext seems to be 3 when in my home campaign, and either 2 or 1 when in a guest campaign (no clue why)

Perhaps there is another event that would suit me better.

Anyone have any clue how I would detect when you get a seige? I would really rather avoid having to deternmine your position and see if you are close enough to the flag to get points.

EDIT: FIgured it out. I should be using the Capture area status event.

Last edited by mikethecoder4 : 05/03/14 at 12:02 PM.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Detect when you've taken a keep

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