3 static const string ORDER_PORT =
"OrderObjectIn";
4 static const string ORDER_TYPE =
"OrderTypeOut";
5 static const string SCRIPTED_ORDER =
"IsScriptedOrder";
6 static const string ORDER_VALUE =
"SciptedOrderValue";
7 static const string ORDER_DEBUG_TEXT =
"DebugText";
10 [
Attribute(
"0", UIWidgets.CheckBox,
"Log Debug")]
14 string m_sDebugString;
16 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
18 if (!GetVariableIn(ORDER_PORT, m_Order))
19 return ENodeResult.FAIL;
21 return ENodeResult.FAIL;
23 SetVariableOut(ORDER_DEBUG_TEXT, m_Order.GetText());
26 if (!order && m_Order)
28 SetVariableOut(ORDER_TYPE, m_Order.GetOrderType());
29 SetVariableOut(SCRIPTED_ORDER,
false);
30 ClearVariable(ORDER_VALUE);
34 order.GetOrderParameters(
this);
37 PrintFormat(
"%1 : %2",owner,m_sDebugString);
47 dbgString = m_Order.GetOrderTypeString();
52 AddDebugMessage(owner,
string.Format(
"Process order: %1, from BT: %2", order, order.m_sSentFromBt));
55 return ENodeResult.SUCCESS;
58 protected static ref TStringArray s_aVarsOut = {
64 override TStringArray GetVariablesOut()
69 protected static ref TStringArray s_aVarsIn = {
72 override TStringArray GetVariablesIn()
77 override bool VisibleInPalette()
82 override string GetOnHoverDescription()
84 return "Process order: reads order and gets type and data of order from it";
88 protected void AddDebugMessage(AIAgent agent,
string str)
90 SCR_AIInfoBaseComponent infoComp = SCR_AIInfoBaseComponent.Cast(agent.FindComponent(SCR_AIInfoBaseComponent));