3 static const string WAYPOINT_PORT =
"WaypointIn";
4 static const string COMPONENT_PORT =
"SmartActionComponent";
7 protected override bool VisibleInPalette()
13 protected static ref TStringArray s_aVarsIn = {
16 override TStringArray GetVariablesIn()
22 protected static ref TStringArray s_aVarsOut = {
25 override TStringArray GetVariablesOut()
31 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
33 AIGroup group = AIGroup.Cast(owner);
37 return ENodeResult.FAIL;
41 if(!GetVariableIn(WAYPOINT_PORT,wp))
42 wp = group.GetCurrentWaypoint();
44 return ENodeResult.FAIL;
49 return ENodeResult.FAIL;
54 SAWP.GetSmartActionEntity(SAEntity, SATag);
56 if (!SAEntity || SATag.IsEmpty())
57 return ENodeResult.FAIL;
61 array<Managed> outComponents = {};
63 array<string> outTags = {};
66 IEntity child = SAEntity.GetChildren();
69 array<Managed> entityComponents = {};
71 outComponents.InsertAll(entityComponents);
72 child = child.GetSibling();
75 foreach (Managed outComponent : outComponents)
80 component.GetTags(outTags);
81 if (outTags.Contains(SATag) && component.IsActionAccessible())
83 SetVariableOut(COMPONENT_PORT, component);
84 return ENodeResult.SUCCESS;
88 return ENodeResult.FAIL;
92 protected override string GetOnHoverDescription()
94 return "Returns SmartActionComponent set on waypoint, fails if waypoint is not set properly (entity or tag is missing).";