Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIDecoVectorDistance.c
Go to the documentation of this file.
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
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) ||
27 return false;
28
31
32 return vector.Distance(v0, v1) < t;
33 }
34}
proto bool GetVariableIn(string name, out void val)
override bool TestFunction(AIAgent owner)
static override string GetOnHoverDescription()
static const string PORT_DISTANCE_THRESHOLD
override TStringArray GetVariablesIn()
static ref TStringArray s_aVarsIn
SCR_FieldOfViewSettings Attribute
array< string > TStringArray
Definition Types.c:385