Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
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 static 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 static 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};
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 static override bool VisibleInPalette()
72 {
73 return true;
74 }
75};
ENodeResult NodeError(Node node, AIAgent owner, string msg)
Error call to be used in scripted BT nodes.
Definition NodeError.c:3
EMessageType_Info
proto bool GetVariableIn(string name, out void val)
bool VisibleInPalette()
string GetOnHoverDescription()
Definition Node.c:30
static const ref TStringArray s_aVarsIn2
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
static override bool VisibleInPalette()
override TStringArray GetVariablesIn()
Base class for nodes sending message.
ENodeResult SendMessage(AIAgent owner, AIMessage msg)
Calls this in inherited nodes to send the message.
bool InitSendMessageInputs(AIAgent owner)
Class for generic nodes with extra input ports which send messages.
ENodeResult
Definition ENodeResult.c:13
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute
array< string > TStringArray
Definition Types.c:385