Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AISendInfoMessage.c
Go to the documentation of this file.
1 // Obsolete, don't use, instead use autogenerated SCR_AISendInfoMessage_... nodes
3 {
4  [Attribute("0", UIWidgets.ComboBox, "Message type", "", ParamEnumArray.FromEnum(EMessageType_Info) )]
5  private EMessageType_Info m_messageType;
6 
7 
8  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
9  {
10  Print("SCR_AISendInfoMessage is obsolete!", LogLevel.WARNING);
11  return ENodeResult.FAIL;
12  }
13 
14  override string GetOnHoverDescription()
15  {
16  return "Obsolete! Use autogenerated SCR_AISendInfoMessage_... nodes instead!";
17  };
18 };
19 
21 {
22  [Attribute("", UIWidgets.EditBox, "Related action type name")]
23  string m_sActionTypename;
24 
25  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
26  {
27  if (!InitSendMessageInputs(owner))
28  return false;
29 
31  msg.SetMessageParameters(this);
32  msg.m_ActionTypename = m_sActionTypename.ToType();
33  if (!msg.m_ActionTypename)
34  return NodeError(this, owner, "Invalid type provided!");
35 
36  return SendMessage(owner, msg);
37  }
38 
39  override bool VisibleInPalette()
40  {
41  return true;
42  }
43 };
44 
46 {
47  const static string PORT_TARGET_ENTITY = "TargetEntity";
48 
49  protected static const ref TStringArray s_aVarsIn2 = {PORT_RECEIVER, PORT_TARGET_ENTITY};
50  override TStringArray GetVariablesIn()
51  {
52  return s_aVarsIn2;
53  }
54 
55  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
56  {
57  if (!InitSendMessageInputs(owner))
58  return false;
59 
61  msg.SetMessageParameters(this);
62 
63  IEntity targetEntity;
64  GetVariableIn(PORT_TARGET_ENTITY, targetEntity);
65 
66  msg.m_TargetEntity = targetEntity;
67 
68  return SendMessage(owner, msg);
69  }
70 
71  override bool VisibleInPalette()
72  {
73  return true;
74  }
75 };
SCR_AIMessage_ActionFailed
Definition: SCR_AIMessage.c:240
EMessageType_Info
EMessageType_Info
Definition: SCR_AIMessage.c:1
SCR_AISendMessageBase
Base class for nodes sending message.
Definition: SCR_AISendMessage.c:2
NodeError
ENodeResult NodeError(Node node, AIAgent owner, string msg)
Error call to be used in scripted BT nodes.
Definition: NodeError.c:3
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_AISendMessage_ActionFailed
Definition: SCR_AISendInfoMessage.c:20
SCR_AISendMessageGeneric
Class for generic nodes with extra input ports which send messages.
Definition: SCR_AISendMessage.c:73
SendMessage
void SendMessage(AICommunicationComponent comms, SCR_AIActivityBase activity, vector position, float delay)
Definition: SCR_AIActivitySmokeCoverFeature.c:77
SCR_AISendMessage_HealFailed
Definition: SCR_AISendInfoMessage.c:45
SCR_AISendInfoMessage
Definition: SCR_AISendInfoMessage.c:2
SCR_AIMessage_HealFailed
Definition: SCR_AIMessage.c:251