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_AIDecoIsAboveThreatLevel.c
Go to the documentation of this file.
1
//------------------------------------------------------------------------------------------------
2
class
SCR_AIDecoIsAboveThreatLevel
:
DecoratorScripted
3
{
4
static
private
string
THRESHOLD_PORT =
"ThresholdIn"
;
5
6
SCR_AIInfoComponent
m_InfoComponent;
7
8
[
Attribute
(
"1"
,
UIWidgets
.ComboBox,
"Threat threshold"
,
""
, ParamEnumArray.FromEnum(EAIThreatState) )]
9
private
EAIThreatState m_threatThreshold;
10
11
//------------------------------------------------------------------------------------------------
12
protected
override
void
OnInit
(AIAgent owner)
13
{
14
SCR_ChimeraAIAgent
chimeraAgent =
SCR_ChimeraAIAgent
.Cast(owner);
15
if
(!chimeraAgent)
16
SCR_AgentMustChimera
(
this
, owner);
17
m_InfoComponent = chimeraAgent.m_InfoComponent;
18
}
19
20
//------------------------------------------------------------------------------------------------
21
protected
override
bool
TestFunction
(AIAgent owner)
22
{
23
if
(!m_InfoComponent)
24
{
25
return
false
;
26
};
27
28
EAIThreatState threshold;
29
if
(!
GetVariableIn
(THRESHOLD_PORT,threshold))
30
threshold = m_threatThreshold;
31
32
return
threshold < m_InfoComponent.GetThreatState();
33
}
34
35
//------------------------------------------------------------------------------------------------
36
protected
static
override
string
GetOnHoverDescription
()
37
{
38
return
"Returns true if current threat state is higher than given threshold."
;
39
}
40
41
//------------------------------------------------------------------------------------------------
42
override
protected
string
GetNodeMiddleText
()
43
{
44
return
"Threshold: "
+
typename
.EnumToString(EAIThreatState,m_threatThreshold);
45
}
46
47
//------------------------------------------------------------------------------------------------
48
protected
static
ref
TStringArray
s_aVarsIn
= {
49
THRESHOLD_PORT
50
};
51
protected
override
TStringArray
GetVariablesIn
()
52
{
53
return
s_aVarsIn
;
54
}
55
};
SCR_AgentMustChimera
ENodeResult SCR_AgentMustChimera(Node node, AIAgent owner)
Definition
NodeError.c:21
DecoratorScripted
Definition
DecoratorScripted.c:13
Node::GetVariableIn
proto bool GetVariableIn(string name, out void val)
SCR_AIDecoIsAboveThreatLevel
Definition
SCR_AIDecoIsAboveThreatLevel.c:3
SCR_AIDecoIsAboveThreatLevel::OnInit
override void OnInit(AIAgent owner)
Definition
SCR_AIDecoIsAboveThreatLevel.c:12
SCR_AIDecoIsAboveThreatLevel::GetNodeMiddleText
string GetNodeMiddleText()
Definition
SCR_AIDecoIsAboveThreatLevel.c:42
SCR_AIDecoIsAboveThreatLevel::s_aVarsIn
static ref TStringArray s_aVarsIn
Definition
SCR_AIDecoIsAboveThreatLevel.c:48
SCR_AIDecoIsAboveThreatLevel::TestFunction
override bool TestFunction(AIAgent owner)
Definition
SCR_AIDecoIsAboveThreatLevel.c:21
SCR_AIDecoIsAboveThreatLevel::GetVariablesIn
override TStringArray GetVariablesIn()
Definition
SCR_AIDecoIsAboveThreatLevel.c:51
SCR_AIDecoIsAboveThreatLevel::GetOnHoverDescription
static override string GetOnHoverDescription()
Definition
SCR_AIDecoIsAboveThreatLevel.c:36
SCR_AIInfoComponent
Definition
SCR_AIInfoComponent.c:46
SCR_ChimeraAIAgent
Definition
SCR_ChimeraAIAgent.c:6
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
AI
ScriptedNodes
Soldier
SCR_AIDecoIsAboveThreatLevel.c
Generated by
1.17.0