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_AIDefendBehavior.c
Go to the documentation of this file.
1
class
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
};
location
vector location
Definition
BlenderEndpoints.c:48
m_fPriorityLevel
ref SCR_BTParam< float > m_fPriorityLevel
Definition
SCR_AIAction.c:87
PRIORITY_LEVEL_NORMAL
enum EAIActionFailReason PRIORITY_LEVEL_NORMAL
m_sBehaviorTree
ResourceName m_sBehaviorTree
Definition
SCR_AIAction.c:89
GetActionDebugInfo
string GetActionDebugInfo()
Definition
SCR_AIAction.c:185
GetCause
int GetCause()
Definition
SCR_AIAction.c:129
SCR_AIActivityBase
void SCR_AIActivityBase(SCR_AIGroupUtilityComponent utility, AIWaypoint relatedWaypoint)
Definition
SCR_AIActivity.c:44
SCR_AIBehaviorBase
void SCR_AIBehaviorBase(SCR_AIUtilityComponent utility, SCR_AIActivityBase groupActivity)
Definition
SCR_AIBehavior.c:23
SCR_EAIBehaviorCause
SCR_EAIBehaviorCause
Definition
SCR_AIBehavior.c:2
SCR_AIActionTask
Definition
SCR_AIBehaviorTask.c:2
vector
Definition
vector.c:13
ToString
proto external string ToString()
Plain C++ pointer, no weak pointers, no memory management.
scripts
Game
AI
Behavior
SCR_AIDefendBehavior.c
Generated by
1.17.0