Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AISetCompartmentAccessible.c
Go to the documentation of this file.
2{
3 static const string COMPARTMENT_PORT = "CompartmentIn";
4
5 protected bool m_bAbortDone;
6
7 //----------------------------------------------------------------------------------------------------------------------------------------------
8 override void OnEnter(AIAgent owner)
9 {
10 m_bAbortDone = false;
11 }
12
13 //----------------------------------------------------------------------------------------------------------------------------------------------
14 override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
15 {
16 return ENodeResult.RUNNING;
17 }
18
19 //----------------------------------------------------------------------------------------------------------------------------------------------
20 override void OnAbort(AIAgent owner, Node nodeCausingAbort)
21 {
22 if (m_bAbortDone)
23 return;
24
25 m_bAbortDone = true;
26 BaseCompartmentSlot compartment;
27 if (!GetVariableIn(COMPARTMENT_PORT, compartment))
28 return;
29 compartment.SetCompartmentAccessible(true);
30 }
31
32 //----------------------------------------------------------------------------------------------------------------------------------------------
33 protected static ref TStringArray s_aVarsIn = {
34 COMPARTMENT_PORT
35 };
36
38 {
39 return s_aVarsIn;
40 };
41
42 static override bool VisibleInPalette()
43 {
44 return true;
45 };
46
47 static override string GetOnHoverDescription()
48 {
49 return "SetCompartmnetAccessible: makes the compartment accessible by other AIs OnAbort";
50 };
51
52 static override bool CanReturnRunning()
53 {
54 return true;
55 };
56};
void SetCompartmentAccessible(bool val)
Definition Node.c:13
proto bool GetVariableIn(string name, out void val)
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
override void OnAbort(AIAgent owner, Node nodeCausingAbort)
ENodeResult
Definition ENodeResult.c:13
array< string > TStringArray
Definition Types.c:385