Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIDefendBehavior.c
Go to the documentation of this file.
1class SCR_AIDefendBehavior : SCR_AIBehaviorBase
2{
3 ref SCR_BTParam<AIWaypoint> m_RelatedWaypoint = new SCR_BTParam<AIWaypoint>(SCR_AIActionTask.WAYPOINT_PORT);
4 ref SCR_BTParam<vector> m_fDefendLocation = new SCR_BTParam<vector>(SCR_AIActionTask.DEFEND_LOCATION_PORT);
5 ref SCR_BTParam<float> m_fDefendAngularRange = new SCR_BTParam<float>(SCR_AIActionTask.ANGULAR_RANGE_PORT);
6
7 //---------------------------------------------------------------------------------------------------------------------------------
8 override int GetCause()
9 {
10 return SCR_EAIBehaviorCause.COMBAT;
11 }
12
13 //------------------------------------------------------------------------------------------------------------------------------------------
14 void InitParameters(AIWaypoint relatedWaypoint, vector defendLocation, float defendAngularRange)
15 {
16 m_RelatedWaypoint.Init(this, relatedWaypoint);
17 m_fDefendLocation.Init(this, defendLocation);
18 m_fDefendAngularRange.Init(this, defendAngularRange);
19 }
20
21 //------------------------------------------------------------------------------------------------------------------------------------------
22 void SCR_AIDefendBehavior(SCR_AIUtilityComponent utility, SCR_AIActivityBase groupActivity, AIWaypoint relatedWaypoint, vector location, float angularRange, float priority = PRIORITY_BEHAVIOR_DEFEND, float priorityLevel = PRIORITY_LEVEL_NORMAL)
23 {
24 m_sBehaviorTree = "AI/BehaviorTrees/Chimera/Soldier/Defend.bt";
25 SetPriority(priority);
26 m_fPriorityLevel.m_Value = priorityLevel;
27 InitParameters(relatedWaypoint, location, angularRange);
28 }
29
30 //------------------------------------------------------------------------------------------------------------------------------------------
31 override string GetActionDebugInfo()
32 {
33 return this.ToString() + " defending " + m_RelatedWaypoint.m_Value.ToString();
34 }
35};
vector location
ref SCR_BTParam< float > m_fPriorityLevel
enum EAIActionFailReason PRIORITY_LEVEL_NORMAL
ResourceName m_sBehaviorTree
string GetActionDebugInfo()
int GetCause()
void SCR_AIActivityBase(SCR_AIGroupUtilityComponent utility, AIWaypoint relatedWaypoint)
void SCR_AIBehaviorBase(SCR_AIUtilityComponent utility, SCR_AIActivityBase groupActivity)
SCR_EAIBehaviorCause
proto external string ToString()
Plain C++ pointer, no weak pointers, no memory management.