Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AISendOrderGenerated.c
Go to the documentation of this file.
2{
3 static const string PORT_RECEIVER = "Receiver";
4
5 [Attribute("", UIWidgets.EditBox)]
6 protected string m_sText;
7
8 //-----------------------------------------------------------------------------------------------------------------------------------------------
9 protected bool SendMessage(AIAgent owner, AIAgent receiver, AIMessage msg)
10 {
11 AICommunicationComponent comms = owner.GetCommunicationComponent();
12 if (!comms || !receiver)
13 return false;
14
15 return comms.RequestBroadcast(msg, receiver);
16 }
17
18 //-----------------------------------------------------------------------------------------------------------------------------------------------
19 protected AIAgent GetReceiverAgent(AIAgent owner)
20 {
21 AIAgent receiver;
22 if (!GetVariableIn(PORT_RECEIVER, receiver))
23 receiver = owner;
24
25 return receiver;
26 }
27
28 //-----------------------------------------------------------------------------------------------------------------------------------------------
29 static override bool VisibleInPalette() { return false; }
30}
Base class for all messages related to AI.
Definition AIMessage.c:14
proto bool GetVariableIn(string name, out void val)
bool SendMessage(AIAgent owner, AIAgent receiver, AIMessage msg)
AIAgent GetReceiverAgent(AIAgent owner)
static override bool VisibleInPalette()
SCR_FieldOfViewSettings Attribute