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_AIDecoVectorDistance.c
Go to the documentation of this file.
1
class
SCR_AIDecoVectorDistance
:
DecoratorScripted
2
{
3
protected
static
const
string
PORT_VECTOR_0
=
"Vector0"
;
4
protected
static
const
string
PORT_VECTOR_1
=
"Vector1"
;
5
protected
static
const
string
PORT_DISTANCE_THRESHOLD
=
"Threshold"
;
6
7
protected
static
ref
TStringArray
s_aVarsIn
= {
8
PORT_VECTOR_0
,
9
PORT_VECTOR_1
,
10
PORT_DISTANCE_THRESHOLD
11
};
12
override
TStringArray
GetVariablesIn
() {
return
s_aVarsIn
; }
13
14
[
Attribute
(
"0"
,
UIWidgets
.EditBox)]
15
protected
float
m_fDistanceThreshold
;
16
17
static
override
string
GetOnHoverDescription
() {
return
"Returns true when distance between two vectors is below distance threshold."
; }
18
19
override
bool
TestFunction
(AIAgent owner)
20
{
21
vector
v0;
22
vector
v1;
23
float
t;
24
25
if
(!
GetVariableIn
(
PORT_VECTOR_0
, v0) ||
26
!
GetVariableIn
(
PORT_VECTOR_1
, v1))
27
return
false
;
28
29
if
(!
GetVariableIn
(
PORT_DISTANCE_THRESHOLD
, t))
30
t =
m_fDistanceThreshold
;
31
32
return
vector
.Distance(v0, v1) < t;
33
}
34
}
DecoratorScripted
Definition
DecoratorScripted.c:13
Node::GetVariableIn
proto bool GetVariableIn(string name, out void val)
SCR_AIDecoVectorDistance
Definition
SCR_AIDecoVectorDistance.c:2
SCR_AIDecoVectorDistance::PORT_VECTOR_1
static const string PORT_VECTOR_1
Definition
SCR_AIDecoVectorDistance.c:4
SCR_AIDecoVectorDistance::TestFunction
override bool TestFunction(AIAgent owner)
Definition
SCR_AIDecoVectorDistance.c:19
SCR_AIDecoVectorDistance::GetOnHoverDescription
static override string GetOnHoverDescription()
Definition
SCR_AIDecoVectorDistance.c:17
SCR_AIDecoVectorDistance::PORT_VECTOR_0
static const string PORT_VECTOR_0
Definition
SCR_AIDecoVectorDistance.c:3
SCR_AIDecoVectorDistance::PORT_DISTANCE_THRESHOLD
static const string PORT_DISTANCE_THRESHOLD
Definition
SCR_AIDecoVectorDistance.c:5
SCR_AIDecoVectorDistance::m_fDistanceThreshold
float m_fDistanceThreshold
Definition
SCR_AIDecoVectorDistance.c:15
SCR_AIDecoVectorDistance::GetVariablesIn
override TStringArray GetVariablesIn()
Definition
SCR_AIDecoVectorDistance.c:12
SCR_AIDecoVectorDistance::s_aVarsIn
static ref TStringArray s_aVarsIn
Definition
SCR_AIDecoVectorDistance.c:7
UIWidgets
Definition
attributes.c:40
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
AI
ScriptedNodes
Logical
SCR_AIDecoVectorDistance.c
Generated by
1.17.0