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";
7 protected static ref TStringArray s_aVarsIn = {
10 PORT_DISTANCE_THRESHOLD
12 override TStringArray GetVariablesIn() {
return s_aVarsIn; }
15 protected float m_fDistanceThreshold;
17 override string GetOnHoverDescription() {
return "Returns true when distance between two vectors is below distance threshold."; }
19 override bool TestFunction(AIAgent owner)
25 if (!GetVariableIn(PORT_VECTOR_0, v0) ||
26 !GetVariableIn(PORT_VECTOR_1, v1))
29 if (!GetVariableIn(PORT_DISTANCE_THRESHOLD, t))
30 t = m_fDistanceThreshold;
32 return vector.Distance(v0, v1) < t;