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_AICreateBasicCoverQueryProps.c
Go to the documentation of this file.
1
class
SCR_AICreateBasicCoverQueryProps
:
AITaskScripted
2
{
3
// Outputs
4
protected
const
static
string
PORT_COVER_QUERY_PROPERTIES
=
"CoverQueryProps"
;
5
6
// Inputs
7
protected
const
static
string
PORT_POSITION
=
"Position"
;
8
protected
const
static
string
PORT_RADIUS
=
"Radius"
;
9
10
protected
ref
CoverQueryProperties
m_CoverQueryProps
=
new
CoverQueryProperties
();
11
12
[
Attribute
(
"0"
,
UIWidgets
.EditBox)]
13
protected
float
m_fRadius
;
14
15
[
Attribute
(
"0"
,
UIWidgets
.CheckBox)]
16
protected
bool
m_bSelectHighestScoreCover
;
17
18
//---------------------------------------------------------------
19
override
ENodeResult
EOnTaskSimulate
(AIAgent owner,
float
dt)
20
{
21
IEntity
ownerEntity = owner.GetControlledEntity();
22
if
(!ownerEntity)
23
return
ENodeResult
.FAIL;
24
25
float
radius = 0;
26
if
(!
GetVariableIn
(
PORT_RADIUS
, radius))
27
radius =
m_fRadius
;
28
29
vector
queryPos =
vector
.Zero;
30
if
(!
GetVariableIn
(
PORT_POSITION
, queryPos))
31
queryPos = ownerEntity.
GetOrigin
();
32
33
m_CoverQueryProps
.m_vNearestPolyHalfExtend =
SCR_AIFindCover
.
NEAREST_POLY_HALF_EXTEND
;
34
m_CoverQueryProps
.m_fNmAreaCostScale =
SCR_AIFindCover
.
NAVMESH_AREA_COST_SCALE
;
35
m_CoverQueryProps
.m_vSectorPos = queryPos;
36
m_CoverQueryProps
.m_vSectorDir =
vector
.Zero;
37
m_CoverQueryProps
.m_vThreatPos = queryPos;
// Threat pos is not provided here, it's a basic query in radius
38
m_CoverQueryProps
.m_fQuerySectorAngleCosMin = -1.0;
39
m_CoverQueryProps
.m_fSectorDistMin = 0;
40
m_CoverQueryProps
.m_fSectorDistMax = radius;
41
//m_CoverQueryProps.m_fCoverHeightMin;
42
//m_CoverQueryProps.m_fCoverHeightMax = 10.0;
43
m_CoverQueryProps
.m_fCoverToThreatAngleCosMin = -1.0;
44
m_CoverQueryProps
.m_fScoreWeightDirection = 0;
45
m_CoverQueryProps
.m_fScoreWeightDistance = 1.0;
46
m_CoverQueryProps
.m_bCheckVisibility =
false
;
47
m_CoverQueryProps
.m_bSelectHighestScore =
m_bSelectHighestScoreCover
;
48
m_CoverQueryProps
.m_iMaxCoversToCheck =
SCR_AIFindCover
.
MAX_COVERS_LOW_PRIORITY
;
49
50
SetVariableOut
(
PORT_COVER_QUERY_PROPERTIES
,
m_CoverQueryProps
);
51
52
return
ENodeResult
.SUCCESS;
53
}
54
55
56
57
//---------------------------------------------------------------
58
static
override
bool
VisibleInPalette
() {
return
true
; }
59
60
protected
static
ref
TStringArray
s_aVarsIn
= {
61
PORT_POSITION
,
62
PORT_RADIUS
63
};
64
override
TStringArray
GetVariablesIn
() {
return
s_aVarsIn
; }
65
66
protected
static
ref
TStringArray
s_aVarsOut
= {
67
PORT_COVER_QUERY_PROPERTIES
68
};
69
override
TStringArray
GetVariablesOut
() {
return
s_aVarsOut
; }
70
71
static
override
string
GetOnHoverDescription
() {
return
"Creates CoverQueryProperties for basic circular query without threat visibility checking"
; }
72
}
AITaskScripted
Definition
AITaskScripted.c:13
CoverQueryProperties
Definition
CoverQueryProperties.c:2
IEntity
Definition
IEntity.c:13
IEntity::GetOrigin
proto external vector GetOrigin()
Node::SetVariableOut
proto void SetVariableOut(string name, void val)
Node::GetVariableIn
proto bool GetVariableIn(string name, out void val)
SCR_AICreateBasicCoverQueryProps
Definition
SCR_AICreateBasicCoverQueryProps.c:2
SCR_AICreateBasicCoverQueryProps::PORT_POSITION
static const string PORT_POSITION
Definition
SCR_AICreateBasicCoverQueryProps.c:7
SCR_AICreateBasicCoverQueryProps::VisibleInPalette
static override bool VisibleInPalette()
Definition
SCR_AICreateBasicCoverQueryProps.c:58
SCR_AICreateBasicCoverQueryProps::GetOnHoverDescription
static override string GetOnHoverDescription()
Definition
SCR_AICreateBasicCoverQueryProps.c:71
SCR_AICreateBasicCoverQueryProps::m_bSelectHighestScoreCover
bool m_bSelectHighestScoreCover
Definition
SCR_AICreateBasicCoverQueryProps.c:16
SCR_AICreateBasicCoverQueryProps::s_aVarsOut
static ref TStringArray s_aVarsOut
Definition
SCR_AICreateBasicCoverQueryProps.c:66
SCR_AICreateBasicCoverQueryProps::PORT_RADIUS
static const string PORT_RADIUS
Definition
SCR_AICreateBasicCoverQueryProps.c:8
SCR_AICreateBasicCoverQueryProps::PORT_COVER_QUERY_PROPERTIES
static const string PORT_COVER_QUERY_PROPERTIES
Definition
SCR_AICreateBasicCoverQueryProps.c:4
SCR_AICreateBasicCoverQueryProps::GetVariablesOut
override TStringArray GetVariablesOut()
Definition
SCR_AICreateBasicCoverQueryProps.c:69
SCR_AICreateBasicCoverQueryProps::GetVariablesIn
override TStringArray GetVariablesIn()
Definition
SCR_AICreateBasicCoverQueryProps.c:64
SCR_AICreateBasicCoverQueryProps::m_CoverQueryProps
ref CoverQueryProperties m_CoverQueryProps
Definition
SCR_AICreateBasicCoverQueryProps.c:10
SCR_AICreateBasicCoverQueryProps::m_fRadius
float m_fRadius
Definition
SCR_AICreateBasicCoverQueryProps.c:13
SCR_AICreateBasicCoverQueryProps::s_aVarsIn
static ref TStringArray s_aVarsIn
Definition
SCR_AICreateBasicCoverQueryProps.c:60
SCR_AICreateBasicCoverQueryProps::EOnTaskSimulate
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
Definition
SCR_AICreateBasicCoverQueryProps.c:19
SCR_AIFindCover
Definition
SCR_AIFindCover.c:2
SCR_AIFindCover::NAVMESH_AREA_COST_SCALE
const float NAVMESH_AREA_COST_SCALE
Definition
SCR_AIFindCover.c:21
SCR_AIFindCover::MAX_COVERS_LOW_PRIORITY
const int MAX_COVERS_LOW_PRIORITY
Definition
SCR_AIFindCover.c:20
SCR_AIFindCover::NEAREST_POLY_HALF_EXTEND
const vector NEAREST_POLY_HALF_EXTEND
Definition
SCR_AIFindCover.c:18
UIWidgets
Definition
attributes.c:40
vector
Definition
vector.c:13
ENodeResult
ENodeResult
Definition
ENodeResult.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
AI
Movement
SCR_AICreateBasicCoverQueryProps.c
Generated by
1.17.0