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_AIPickupInventoryItemsBehavior.c
Go to the documentation of this file.
1
class
SCR_AIPickupInventoryItemsBehavior
:
SCR_AIBehaviorBase
2
{
3
protected
static
const
string
PICKUP_POSITION_PORT
=
"PickupPosition"
;
4
static
const
string
MAGAZINE_WELL_TYPE_PORT
=
"MagazineWellType"
;
5
6
ref SCR_BTParam<vector>
m_vPickupPosition
=
new
SCR_BTParam<vector>(
PICKUP_POSITION_PORT
);
7
ref SCR_BTParam<typename>
m_MagazineWellType
=
new
SCR_BTParam<typename>(
MAGAZINE_WELL_TYPE_PORT
);
8
9
ref
SCR_AIMoveIndividuallyBehavior
m_MoveBehavior
;
10
11
//-------------------------------------------------------------------------------------------------------------
12
void
InitProperties
(
vector
pickupPosition,
typename
magazineWellType)
13
{
14
m_vPickupPosition
.Init(
this
, pickupPosition);
15
m_MagazineWellType
.Init(
this
, magazineWellType);
16
}
17
18
//---------------------------------------------------------------------------------------------------------------------------------
19
override
int
GetCause
()
20
{
21
return
SCR_EAIBehaviorCause
.SELF_AID;
22
}
23
24
//-------------------------------------------------------------------------------------------------------------
25
void
SCR_AIPickupInventoryItemsBehavior
(SCR_AIUtilityComponent utility,
SCR_AIActivityBase
groupActivity,
26
vector
pickupPosition,
typename
magazineWellType,
float
priorityLevel =
PRIORITY_LEVEL_NORMAL
)
27
{
28
SetPriority(SCR_AIActionBase.PRIORITY_BEHAVIOR_PICKUP_INVENTORY_ITEMS);
29
m_fPriorityLevel
.m_Value = priorityLevel;
30
m_sBehaviorTree
=
"{8522FD17F6E08C47}AI/BehaviorTrees/Chimera/Soldier/PickupInventoryItems.bt"
;
31
32
SetIsUniqueInActionQueue(
true
);
33
InitProperties
(pickupPosition, magazineWellType);
34
35
if
(!utility)
36
return
;
37
38
float
movePriority =
GetPriority
() + 0.1;
39
m_MoveBehavior
=
new
SCR_AIMoveIndividuallyBehavior
(utility, groupActivity, pickupPosition, priority: movePriority, priorityLevel: priorityLevel, radius: 0.3);
40
utility.AddAction(
m_MoveBehavior
);
41
}
42
43
//------------------------------------------------------------------------------------------------------------------------------------
44
override
void
OnActionCompleted
()
45
{
46
super.OnActionCompleted();
47
if
(
m_MoveBehavior
)
48
m_MoveBehavior
.Complete();
49
}
50
51
//------------------------------------------------------------------------------------------------------------------------------------
52
override
void
OnActionFailed
()
53
{
54
super.OnActionFailed();
55
if
(
m_MoveBehavior
)
56
m_MoveBehavior
.Fail();
57
}
58
}
59
60
class
SCR_AIGetPickupInventoryItemsParameters:
SCR_AIGetActionParameters
61
{
62
static
ref
TStringArray
s_aVarsOut
= (
new
SCR_AIPickupInventoryItemsBehavior(null, null, vector.Zero, BaseMagazineWell)).
GetPortNames
();
63
override
TStringArray
GetVariablesOut
() {
return
s_aVarsOut; }
64
static
override
bool
VisibleInPalette
() {
return
true
; }
65
};
m_fPriorityLevel
ref SCR_BTParam< float > m_fPriorityLevel
Definition
SCR_AIAction.c:87
PRIORITY_LEVEL_NORMAL
enum EAIActionFailReason PRIORITY_LEVEL_NORMAL
GetPortNames
TStringArray GetPortNames()
Definition
SCR_AIAction.c:238
m_sBehaviorTree
ResourceName m_sBehaviorTree
Definition
SCR_AIAction.c:89
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
GetVariablesOut
override TStringArray GetVariablesOut()
Definition
SCR_AIFindFirePositionBehavior.c:133
s_aVarsOut
SCR_AIPickupInventoryItemsBehavior s_aVarsOut
Definition
SCR_AIGetCombatMoveRequestParameters.c:152
SCR_AIGetActionParameters
Definition
SCR_AIGetActionParameters.c:23
SCR_AIGetActionParameters::VisibleInPalette
static override bool VisibleInPalette()
Definition
SCR_AIGetActionParameters.c:38
SCR_AIMoveIndividuallyBehavior
Definition
SCR_AIMoveBehavior.c:52
SCR_AIPickupInventoryItemsBehavior::SCR_AIPickupInventoryItemsBehavior
void SCR_AIPickupInventoryItemsBehavior(SCR_AIUtilityComponent utility, SCR_AIActivityBase groupActivity, vector pickupPosition, typename magazineWellType, float priorityLevel=PRIORITY_LEVEL_NORMAL)
Definition
SCR_AIPickupInventoryItemsBehavior.c:25
SCR_AIPickupInventoryItemsBehavior::InitProperties
void InitProperties(vector pickupPosition, typename magazineWellType)
Definition
SCR_AIPickupInventoryItemsBehavior.c:12
SCR_AIPickupInventoryItemsBehavior::OnActionCompleted
override void OnActionCompleted()
Definition
SCR_AIPickupInventoryItemsBehavior.c:44
SCR_AIPickupInventoryItemsBehavior::OnActionFailed
override void OnActionFailed()
Definition
SCR_AIPickupInventoryItemsBehavior.c:52
SCR_AIPickupInventoryItemsBehavior::GetCause
override int GetCause()
Definition
SCR_AIPickupInventoryItemsBehavior.c:19
SCR_AIPickupInventoryItemsBehavior::m_vPickupPosition
ref SCR_BTParam< vector > m_vPickupPosition
Definition
SCR_AIPickupInventoryItemsBehavior.c:6
SCR_AIPickupInventoryItemsBehavior::m_MagazineWellType
ref SCR_BTParam< typename > m_MagazineWellType
Definition
SCR_AIPickupInventoryItemsBehavior.c:7
SCR_AIPickupInventoryItemsBehavior::MAGAZINE_WELL_TYPE_PORT
static const string MAGAZINE_WELL_TYPE_PORT
Definition
SCR_AIPickupInventoryItemsBehavior.c:4
SCR_AIPickupInventoryItemsBehavior::PICKUP_POSITION_PORT
static const string PICKUP_POSITION_PORT
Definition
SCR_AIPickupInventoryItemsBehavior.c:3
SCR_AIPickupInventoryItemsBehavior::m_MoveBehavior
ref SCR_AIMoveIndividuallyBehavior m_MoveBehavior
Definition
SCR_AIPickupInventoryItemsBehavior.c:9
vector
Definition
vector.c:13
GetPriority
int GetPriority()
Definition
SCR_BaseManualCameraComponent.c:247
TStringArray
array< string > TStringArray
Definition
Types.c:385
scripts
Game
AI
Behavior
SCR_AIPickupInventoryItemsBehavior.c
Generated by
1.17.0