3 static const string PORT_RECEIVER =
"Receiver";
6 protected string m_sText;
11 SCR_AIBaseUtilityComponent utilityComp = SCR_AIBaseUtilityComponent.Cast(owner.FindComponent(SCR_AIBaseUtilityComponent));
30 protected AIWaypoint GetRelatedWaypoint(AIAgent owner)
32 AIGroup group = AIGroup.Cast(owner);
35 return group.GetCurrentWaypoint();
39 protected bool SendMessage(AIAgent owner, AIAgent receiver,
SCR_AIMessageBase msg)
41 AICommunicationComponent comms = owner.GetCommunicationComponent();
42 if (!comms || !receiver)
46 InitDebugData(msg.m_sSentFromBt);
49 return comms.RequestBroadcast(msg, receiver);
53 protected bool SendMessage(AIAgent owner, AIAgent receiver,
SCR_AIOrderBase msg)
55 AICommunicationComponent comms = owner.GetCommunicationComponent();
56 if (!comms || !receiver)
60 InitDebugData(msg.m_sSentFromBt);
63 return comms.RequestBroadcast(msg, receiver);
67 protected void InitDebugData(out
string outSentFromBt)
69 string parentTreeName;
70 GetParentTreeName(parentTreeName);
71 outSentFromBt =
string.Format(
"%1, node: %2 %3", parentTreeName, GetNodeID(), this.Type());
75 protected AIAgent GetReceiverAgent(AIAgent owner)
78 if (!GetVariableIn(PORT_RECEIVER, receiver))
85 override bool VisibleInPalette() {
return false; }