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_AIUnEquipItems.c
Go to the documentation of this file.
1
class
SCR_AIUnEquipItems
:
AITaskScripted
2
{
3
protected
SCR_GadgetManagerComponent
m_GadgetManager
;
4
5
[
Attribute
( defvalue:
"1"
, uiwidget:
UIWidgets
.CheckBox,
desc
:
"UnEquip on abort or alternatively on simulate"
)]
6
private
bool
m_bKeepRunningUntilAborted;
7
private
bool
m_bHasAborted;
8
9
// -----------------------------------------------------------------------------------------------
10
override
void
OnInit
(AIAgent owner)
11
{
12
IEntity
ownerEntity = owner.GetControlledEntity();
13
if
(!ownerEntity)
14
NodeError
(
this
, owner,
"Missing owner entity!"
);
15
16
m_GadgetManager
=
SCR_GadgetManagerComponent
.
GetGadgetManager
(ownerEntity);
17
}
18
19
// -----------------------------------------------------------------------------------------------
20
override
void
OnEnter(AIAgent owner)
21
{
22
m_bHasAborted =
false
;
23
}
24
25
// -----------------------------------------------------------------------------------------------
26
override
ENodeResult
EOnTaskSimulate(AIAgent owner,
float
dt)
27
{
28
if
(!m_bKeepRunningUntilAborted &&
m_GadgetManager
)
29
{
30
m_GadgetManager
.RemoveHeldGadget();
31
return
ENodeResult
.SUCCESS;
32
}
33
34
return
ENodeResult
.RUNNING;
35
}
36
37
// -----------------------------------------------------------------------------------------------
38
override
void
OnAbort(AIAgent owner, Node nodeCausingAbort)
39
{
40
if
(m_bHasAborted)
41
return
;
42
43
m_GadgetManager
.RemoveHeldGadget();
44
m_bHasAborted =
true
;
45
}
46
47
// -----------------------------------------------------------------------------------------------
48
protected
override
string
GetNodeMiddleText
()
49
{
50
if
(m_bKeepRunningUntilAborted)
51
return
"Item unequiped when this node is aborted"
;
52
else
53
return
"Item unequiped when node starts running"
;
54
}
55
56
// -----------------------------------------------------------------------------------------------
57
protected
static
override
bool
VisibleInPalette
()
58
{
59
return
true
;
60
}
61
62
// -----------------------------------------------------------------------------------------------
63
static
override
bool
CanReturnRunning
()
64
{
65
return
true
;
66
}
67
68
// -----------------------------------------------------------------------------------------------
69
protected
static
override
string
GetOnHoverDescription
()
70
{
71
return
"Scripted Node: UnEquip any generic item or gadget that is currently being held by the character."
;
72
}
73
};
NodeError
ENodeResult NodeError(Node node, AIAgent owner, string msg)
Error call to be used in scripted BT nodes.
Definition
NodeError.c:3
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
AITaskScripted
Definition
AITaskScripted.c:13
IEntity
Definition
IEntity.c:13
SCR_AIUnEquipItems
Definition
SCR_AIUnEquipItems.c:2
SCR_AIUnEquipItems::GetOnHoverDescription
static override string GetOnHoverDescription()
Definition
SCR_AIUnEquipItems.c:69
SCR_AIUnEquipItems::CanReturnRunning
static override bool CanReturnRunning()
Definition
SCR_AIUnEquipItems.c:63
SCR_AIUnEquipItems::m_GadgetManager
SCR_GadgetManagerComponent m_GadgetManager
Definition
SCR_AIUnEquipItems.c:3
SCR_AIUnEquipItems::VisibleInPalette
static override bool VisibleInPalette()
Definition
SCR_AIUnEquipItems.c:57
SCR_AIUnEquipItems::GetNodeMiddleText
override string GetNodeMiddleText()
Definition
SCR_AIUnEquipItems.c:48
SCR_GadgetManagerComponent
Definition
SCR_GadgetManagerComponent.c:140
SCR_GadgetManagerComponent::GetGadgetManager
static SCR_GadgetManagerComponent GetGadgetManager(IEntity entity)
Definition
SCR_GadgetManagerComponent.c:177
UIWidgets
Definition
attributes.c:40
ENodeResult
ENodeResult
Definition
ENodeResult.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
OnInit
@ OnInit
Definition
SndComponentCallbacks.c:17
scripts
Game
AI
ScriptedNodes
Soldier
SCR_AIUnEquipItems.c
Generated by
1.17.0