Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_AIDecoOnWaypointChanged.c
Go to the documentation of this file.
1
class
SCR_AIDecoOnWaypointChanged
:
DecoratorScripted
2
{
3
static
const
string
PORT_WAYPOINT_OUT =
"OutWaypoint"
;
4
5
6
protected
static
ref
TStringArray
s_aVarsOut
= {
7
PORT_WAYPOINT_OUT
8
};
9
override
TStringArray
GetVariablesOut
()
10
{
11
return
s_aVarsOut
;
12
}
13
14
private
AIWaypoint m_oCurrentWaypoint;
15
16
protected
override
bool
TestFunction
(AIAgent owner)
17
{
18
AIGroup group = AIGroup.Cast(owner);
19
if
(!group)
20
{
21
SCR_AgentMustBeAIGroup
(
this
, owner);
22
return
false
;
23
}
24
25
AIWaypoint newWaypoint = group.GetCurrentWaypoint();
26
bool
result =
true
;
27
28
if
(!newWaypoint)
29
result =
false
;
30
else
if
(newWaypoint != m_oCurrentWaypoint)
31
result =
false
;
32
else
33
result =
true
;
34
35
m_oCurrentWaypoint = newWaypoint;
36
37
if
(m_oCurrentWaypoint)
38
SetVariableOut
(PORT_WAYPOINT_OUT,m_oCurrentWaypoint);
39
else
40
ClearVariable
(PORT_WAYPOINT_OUT);
41
42
return
result;
43
}
44
45
protected
static
override
bool
VisibleInPalette
()
46
{
47
return
true
;
48
}
49
50
protected
static
override
string
GetOnHoverDescription
()
51
{
52
return
"SCR_AIDecoOnWaypointChanged: Returns false if current waypoint is changed or is null"
;
53
}
54
};
55
SCR_AgentMustBeAIGroup
void SCR_AgentMustBeAIGroup(Node node, AIAgent owner)
Definition
NodeError.c:14
DecoratorScripted
Definition
DecoratorScripted.c:13
Node::SetVariableOut
proto void SetVariableOut(string name, void val)
Node::ClearVariable
proto void ClearVariable(string name)
SCR_AIDecoOnWaypointChanged
Definition
SCR_AIDecoOnWaypointChanged.c:2
SCR_AIDecoOnWaypointChanged::GetVariablesOut
override TStringArray GetVariablesOut()
Definition
SCR_AIDecoOnWaypointChanged.c:9
SCR_AIDecoOnWaypointChanged::GetOnHoverDescription
static override string GetOnHoverDescription()
Definition
SCR_AIDecoOnWaypointChanged.c:50
SCR_AIDecoOnWaypointChanged::s_aVarsOut
static ref TStringArray s_aVarsOut
Definition
SCR_AIDecoOnWaypointChanged.c:6
SCR_AIDecoOnWaypointChanged::TestFunction
override bool TestFunction(AIAgent owner)
Definition
SCR_AIDecoOnWaypointChanged.c:16
SCR_AIDecoOnWaypointChanged::VisibleInPalette
static override bool VisibleInPalette()
Definition
SCR_AIDecoOnWaypointChanged.c:45
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
AI
ScriptedNodes
Groups
SCR_AIDecoOnWaypointChanged.c
Generated by
1.17.0