Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIGetWaypointParameters.c
Go to the documentation of this file.
2{
3 static const string PORT_WAYPOINT_IN = "WaypointIn";
4 static const string PORT_WAYPOINT_OUT = "WaypointOut";
5 static const string PORT_RADIUS = "Radius";
6 static const string PORT_ORIGIN = "Origin";
7 static const string PORT_PRIORITY_LEVEL = "PriorityLevel";
8 static const string PORT_BOARDING_PARAMS = "BoardingParams";
9 static const string PORT_WAYPOINT_HOLDING_TIME = "HoldingTime";
10 static const string PORT_USE_TURRETS = "UseTurrets";
11 static const string PORT_SEARCH_TAGS = "SearchTags";
12 static const string PORT_FAST_INIT = "FastInit";
13 static const string PORT_VEHICLE = "Vehicle";
14 static const string PORT_ENTITY = "Entity";
15
17
18 //------------------------------------------------------------------------------------------------
19 override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
20 {
21 IEntity wpEntity;
22 if (!GetVariableIn(PORT_WAYPOINT_IN, wpEntity))
23 {
24 AIGroup group = AIGroup.Cast(owner);
25 if (!group)
26 {
27 SCR_AgentMustBeAIGroup(this, owner);
28 return ENodeResult.FAIL;
29 }
30 m_Waypoint = SCR_AIWaypoint.Cast(group.GetCurrentWaypoint());
31 }
32 else
33 m_Waypoint = SCR_AIWaypoint.Cast(wpEntity);
34
35 if (!m_Waypoint)
36 // waypoint is deleted and we didnt react on it, yet
37 return ENodeResult.FAIL;
38
39 SetVariableOut(PORT_WAYPOINT_OUT, m_Waypoint);
40 SetVariableOut(PORT_RADIUS, m_Waypoint.GetCompletionRadius());
41 SetVariableOut(PORT_ORIGIN, m_Waypoint.GetOrigin());
42 SetVariableOut(PORT_PRIORITY_LEVEL, m_Waypoint.GetPriorityLevel());
43
44 return ENodeResult.SUCCESS;
45 }
46
47 //------------------------------------------------------------------------------------------------
48 protected static override bool VisibleInPalette() { return true; }
49
50 protected static ref TStringArray s_aVarsIn = {
51 PORT_WAYPOINT_IN
52 };
54 {
55 return s_aVarsIn;
56 }
57
58 protected static ref TStringArray s_aVarsOut_Base = {
59 PORT_WAYPOINT_OUT,
60 PORT_RADIUS,
61 PORT_ORIGIN,
62 PORT_PRIORITY_LEVEL
63 };
65 {
66 return s_aVarsOut_Base;
67 }
68};
void SCR_AgentMustBeAIGroup(Node node, AIAgent owner)
Definition NodeError.c:14
proto void SetVariableOut(string name, void val)
proto bool GetVariableIn(string name, out void val)
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
ENodeResult
Definition ENodeResult.c:13
array< string > TStringArray
Definition Types.c:385