3 static const string PORT_AGENT =
"Agent";
5 protected SCR_AIGroupUtilityComponent m_groupUtilityComponent;
8 protected static ref TStringArray s_aVarsIn = {
11 override TStringArray GetVariablesIn()
17 override void OnInit(AIAgent owner)
19 m_groupUtilityComponent = SCR_AIGroupUtilityComponent.Cast(owner.FindComponent(SCR_AIGroupUtilityComponent));
23 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
25 if (!m_groupUtilityComponent)
26 return NodeError(
this,owner,
"AIAgent does not have group utility component!");
29 if (!GetVariableIn(PORT_AGENT, defender))
31 return NodeError(
this, owner,
"No agent provided");
37 return NodeError(
this, owner,
"Not running defend activity!");
39 defendActivity.AddAgentToRadialCover(defender);
40 return ENodeResult.SUCCESS;
44 protected override bool VisibleInPalette()
50 protected override string GetOnHoverDescription()
52 return "Adds unit to list of covering units of defend waypoint";